<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>remoting &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/remoting/</link>
	<description>Feed of posts on WordPress.com tagged "remoting"</description>
	<pubDate>Wed, 10 Feb 2010 15:58:33 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Enable Remoting on Windows 7]]></title>
<link>http://arabianpowershell.wordpress.com/2009/11/28/enable-remoting-on-windows-7/</link>
<pubDate>Sat, 28 Nov 2009 15:02:00 +0000</pubDate>
<dc:creator>Sherif Talaat</dc:creator>
<guid>http://arabianpowershell.wordpress.com/2009/11/28/enable-remoting-on-windows-7/</guid>
<description><![CDATA[PowerShell Remoting خاصية من أهم الخواص اللي تميز بيها PowerShell عن غيره من الـ Shells التقليدية. ز]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>PowerShell Remoting خاصية من أهم الخواص اللي تميز بيها PowerShell عن غيره من الـ Shells التقليدية. زي ما قولت قبل كده ان خاصية الـ Remoting بتوفر إمكانية تشغيل وتنفيذ أوامر PowerShell او ما يعرف بـ cmdlets على أي جهاز كمبيوتر داخل الـ network بشرط ان يكون PowerShell موجود (Installed) على الكمبيوتر ده.</p>
<p>على الرغم من أن PowerShell Remoting خاصية أكتر من ممتازة، لا يمكن إستخدامها في أي Workgroup environment أو peer-to-peer (P2P) network. يمكن إستخدامها فقط في Domain-Environment أو AD-Environment لأسباب أمنية (Security).</p>
<p>دلوقتي في Windows 7 بقي ممكن إستخدام خاصية الـ Remoting في أي workgroup أو Peer-to-Peer.</p>
<p>ملحوظة: قبل ما أبدء في الشرح يفترض ان يكون عندك 2 كمبيوتر (A,B) عليهم Windows 7  و Windows PowerShell v2 و التأكد من الـ 2 كمبيوتر في نفس الـ IP Add. range، على سبيل المثال الـ IP Address لكمبيوتر A هيكون 192.168.1.10 والـ IP Address لكمبيوتر B هيكون 192.168.1.20.</p>
<p>دلوقتي هنحاول أن احنا نفتح Remote Session من كمبيوتر A إلي كمبيوتر B عن طريق إستخدام أمر Enter-PSSession:</p>
<p><strong>Enter-PSSession 192.168.1.20</strong></p>
<p>هنلاقي أن PowerShell Console طلع Error بيقول ان في مشكلة في الـ WinRM. الموضوع ببساطة ان الـ Remoting بيعتمد على حاجة اسمها Windows Remote Management المسئولة عن إستقبال اي Remote Connection، سبب الـ Error هو ان الـ WinRM Service مقفولة على الـ Windows عشان هي <a href="http://en.wikipedia.org/wiki/Secure_by_default" target="_blank">Secure by default</a> لأسباب أمنية.</p>
<p><strong>الخطوة الأولي: تشغيل WinRM على كمبيوتر A و B</strong></p>
<p>لتشغيل WinRM هنستخدم أمر  <strong>Set-WSManQuickConfig ، </strong>قبل متستخدم الأمر تأكد من:</p>
<ul>
<li> ان ليك Administrative Privileges.</li>
<li> أنك عايز تشغل WinRM وقادر علي تأمين جهازك وشبكتك وده عشان الأمر ده بيعمل الآتي:</li>
<li> بيتأكد أن WinRM شغالة ولا مش شغالة بيشغلها.</li>
<li> بيغير الـ Start mode للـ WinRM Service ويبقي Automatic.</li>
<li> بيقوم بإنشاء Listner لإستقبال أي request من أي IP Address. دائما اي request بيتم عن طريق HTTP Protocol.</li>
<li> بيعمل Firewall Exception rule للـ WinRM Service عشان يتأكد ان الـFirewall مش هيقفل اي traffic يخص الـ WS-Management.</li>
</ul>
<p>بمجرد كتابة الأمر Set-WSManQuickConfig و الضغط على Enter لتنفيذه، هتظهرلك رسالة توضح الـ 4 نقاط اللي اتكلمنا عليها</p>
<p><a href="http://arabianpowershell.files.wordpress.com/2009/11/setwsmanquickconfig.png"><img style="display:inline;border-width:0;" title="Set-WSManQuickConfig" src="http://arabianpowershell.files.wordpress.com/2009/11/setwsmanquickconfig_thumb.png?w=410&#038;h=118" border="0" alt="Set-WSManQuickConfig" width="410" height="118" /></a></p>
<p>بعد التأكد من تنفيذ الأمر على كمبيوتر A و كمبيوتر B. هنحاول مرة تانية ان نفتح Remote Session من A إلي B عن طريق أمر Enter-PSSession. لكن هيظهر Error تاني بس السبب مختلف المرة دي. أول مرة كان سبب الـError هو ان الـWinRM Service مش شغالة. المرة سبب الـError هو ان الWinRM بترفض (Reject) أي request غير مُأمن بالـ Kerberos او على الأقل يكون بيستخدم نفس الـ Security mechanism أو ان الكمبيوتر اللي بيرسل الـrequest مش موجود في الـtrusted list في الكمبيوتر اللي بيستقبل، و بما أننا  بنستخدم Windows 7 على كمبيوتر A و B يبقي بنستخدم نفس الـ Security mechanism ،يبقي لنا ان الكمبيوتر مش موجود في الـ trusted list. والهدف منها هو التأكد من أن الكمبيوتر المحددة فقط هي المسموح لها بإستخدام خاصية الـ Remoting وليس أي كمبيوتر أخر.</p>
<p>قبل إضافة كمبيوتر B إلي الـ trusted list في كمبيوتر A.</p>
<p>هنستخدم أمر <strong>Test-WSMan </strong>عشان نتأكد ان على الأقل كمبيوتر A وكمبيوتر B قادرين على فتح Remote Sessions بينهم بغض النظر عن قبول او رفض الـ requests.</p>
<p><strong>Test-WSMan 192.168.1.20</strong></p>
<p><strong> </strong></p>
<p><strong>الخطوة الثانية: إضافة كمبيوتر A و B إلي الـ TrustedHosts list</strong></p>
<p>الخطوة رقم 2 هي ان احنا هنعرف الـ WinRM على كل كمبيوتر على الكمبيوتر التاني عشان يسمح بإستقبال أي request لفتح اي remote session عن طريق إضافة الكمبيوتر في الـ trustedhosts list. على سبيل المثال عشان نسمح لكمبيوتر B ان يبعت request إلي كمبيوتر A يبقي لازم نُضيف الـ IP Address لكمبيوتر B في الـtrustedhosts list لكمبيوتر A. ويمكن كتابة “ * ” بدلاً من الـIP Address وفي هذه الحالة سيقوم الـWinRM بإستقبال اي Request من اي كمبيوتر وده بيكون عن طريق الأمر ده:</p>
<p><strong>Set-Item WSMan:\localhost\client\trustedhosts * –force</strong></p>
<p><strong>الخطوة الثالثة: جرب و إستمتع…!!! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> :)</strong></p>
<p>بعد تنفيذ الخطوة رقم 2 أصبحت خاصية  الـ remoting جاهزة للإستخدام.</p>
<p><strong>Enter-PSSession 192.168.1.20</strong></p>
<p>بعد لحظات من الضغط على Enter لتنفيذ الأمر (الفترة اللي بيفتح فيها الـremote session) هيظهر الـ PS prompt لكمبيوتر B. دلوقتي تقدر تنفذ اي cmdlet على كمبيوتر B من خلال كمبيوتر A عن طريق PowerShell Remoting.</p>
<p>يمكن إستخدام أمر <strong>Exit-PSSession</strong> عشان تقفل الـRemote Session.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting up Flex BlazeDS in FlashBuilder]]></title>
<link>http://cgrant.wordpress.com/2009/11/19/setting-up-flex-blazeds-in-flashbuilder/</link>
<pubDate>Thu, 19 Nov 2009 18:13:33 +0000</pubDate>
<dc:creator>cgrant</dc:creator>
<guid>http://cgrant.wordpress.com/2009/11/19/setting-up-flex-blazeds-in-flashbuilder/</guid>
<description><![CDATA[One of the most compelling aspects of Flex is its ability to integrate with a wide variety of data s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img style="display:inline;margin-left:0;margin-right:0;" src="http://opensource.adobe.com/wiki/download/attachments/1114252/blazeds_high_119x125.jpg" alt="" align="right" />One of the most compelling aspects of Flex is its ability to integrate with a wide variety of data sources. Many of the introductory tutorials online teach how to connect to http services to pull data. The result is typically an XML response. Flex makes it easy to manage XML but there are better ways. using XML requires an object on the server to be serialized to a text format which adds processing time. The response is also larger due to the variety of XML tags that need to be added in order to properly represent the object’s structure. Yes I hear you in the back telling me that JSON is a lighter weight response that doesn’t require all the tags. Regardless the response still needs to be parse out in the client. Finally the contract between client and server is not well defined with straight XML or JSON. Web services do provide a strict contract for the interface that the client can rely on but  the objects are still serialized with extraneous tags used to define the structure.</p>
<p>BlazeDS utilizes AMF to provide direct links between client and server objects. AMF provides access to objects through a binary protocol and eliminates the need to add additional tags that identify the object structure. It also reduces the work in flex to get the data back into a usable flex object.</p>
<p>Lets start working through an example by getting our workspace setup.</p>
<p>&#160;</p>
<h2>Initial Setup</h2>
<p>Flex and Java both need to know about BlazeDS and where to look for the libraries and configuration files. FlashBuilder lends a hand with this by automating some of the process.</p>
<p><a href="http://images.google.com/imgres?imgurl=http://sujitreddyg.files.wordpress.com/2009/05/flash_builder_logo.png%3Fw%3D300%26h%3D299&#38;imgrefurl=http://sujitreddyg.wordpress.com/2009/05/18/flex-builder-will-be-named-as-flash-builder/&#38;usg=__q_PmVLdlAef9ojFuxpTEp5AYRnM=&#38;h=299&#38;w=300&#38;sz=352&#38;hl=en&#38;start=4&#38;um=1&#38;tbnid=gKh_1hLOa-SHVM:&#38;tbnh=116&#38;tbnw=116&#38;prev=/images%3Fq%3DFlashbuilder%26hl%3Den%26rls%3Dcom.microsoft:en-us%26um%3D1"><img style="display:inline;margin:0 10px 0 0;" src="http://t3.gstatic.com/images?q=tbn%3AgKh_1hLOa-SHVM%3Ahttp%3A%2F%2Fsujitreddyg.files.wordpress.com%2F2009%2F05%2Fflash_builder_logo.png%3Fw%3D300%26h%3D299&#038;w=93&#038;h=93" alt="" width="93" height="93" align="left" /></a>First things first, you’ll need to have FlashBuilder installed. The beta version can be downloaded at <a href="http://labs.adobe.com/technologies/flashbuilder4/">http://labs.adobe.com/technologies/flashbuilder4/</a>.  Also check to make sure you have the WTP extensions installed in eclipse so you can automate creating the web application structure.</p>
<p>Finally for this IDE example we’re going to download the BlazeDS war from adobe at: <a title="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds" href="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds">http://opensource.adobe.com/wiki/display/blazeds/Release+Builds</a> Just download the binary version, we don’t need the full turnkey for this. Once you have it downloaded, extract it to your drive, you should see the blazeds.war when you’re done.</p>
<h3></h3>
<p>In FlashBuilder create a new Flash project. Select J2EE Application server type. Select Remote object access with BlazeDS and the type. Select create combined Java/Flex using WTP. Click next.</p>
<p><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://cgrant.files.wordpress.com/2009/11/image_thumb2.png?w=253&#038;h=304" border="0" alt="image" width="253" height="304" /></p>
<p>&#160;</p>
<p>On the next page, for the BlazeDS WAR file, point to the location where you extracted the files from Adobe. The system will pull all the jar files and configs from this war and add them to your project. Click finish.</p>
<p><a href="http://cgrant.files.wordpress.com/2009/11/image2.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://cgrant.files.wordpress.com/2009/11/image_thumb3.png?w=295&#038;h=214" border="0" alt="image" width="295" height="214" /></a></p>
<p>You’ll notice that FlashBuilder loaded all the Jars and Config files as well as setting up the web.xml.<img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://cgrant.files.wordpress.com/2009/11/image_thumb4.png?w=365&#038;h=213" border="0" alt="image" width="365" height="213" /></p>
<p>The web.xml tells java where to find the config files that BlazeDS needs. Remembering that Flex and Java are compiled separately and both need to know where configuration files are, lets find out where the IDE tells Flex about the config files.</p>
<p>Looking under the project properties under flex compiler you’ll see a compiler option is added for services.</p>
<p><a href="http://cgrant.files.wordpress.com/2009/11/image3.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="image" src="http://cgrant.files.wordpress.com/2009/11/image_thumb5.png?w=244&#038;h=182" border="0" alt="image" width="244" height="182" /></a></p>
<p><strong>NOTE:</strong> Without this compiler option Flex would not be able to find the BlazeDS services. When setting up blazeDS manually this flag will needed to be added by hand.</p>
<p><strong>Java vs Flex:</strong> In Java the config files are loaded at run time. To change a value in the property file you simply need to restart the server to make it take effect. In Flex however this is a compile time include which means any changes to the files will need to be rebuilt into the application. Just a little note that may save you some headaches later.</p>
<p>&#160;</p>
<p>That’s is for the setup.</p>
<p>Next time we’ll look at t<a href="http://cgrant.wordpress.com/2009/11/20/connecting-flex-to-java-with-blazeds/">he code needed to use BlazeDS</a>.  Stay tuned.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Remoting avec Hessian]]></title>
<link>http://jawher.wordpress.com/2009/11/08/remoting-avec-hessian/</link>
<pubDate>Sun, 08 Nov 2009 00:43:57 +0000</pubDate>
<dc:creator>jawher</dc:creator>
<guid>http://jawher.wordpress.com/2009/11/08/remoting-avec-hessian/</guid>
<description><![CDATA[Extrait du synopsis : Cet article a pour objectif de vous présenter une solution légère et rapide de]]></description>
<content:encoded><![CDATA[Extrait du synopsis : Cet article a pour objectif de vous présenter une solution légère et rapide de]]></content:encoded>
</item>
<item>
<title><![CDATA[Schema-based Development with Windows Communication Foundation]]></title>
<link>http://enggtech.wordpress.com/2009/10/14/schema-based-development-with-windows-communication-foundation/</link>
<pubDate>Wed, 14 Oct 2009 18:16:27 +0000</pubDate>
<dc:creator>Visitor Blogs</dc:creator>
<guid>http://enggtech.wordpress.com/2009/10/14/schema-based-development-with-windows-communication-foundation/</guid>
<description><![CDATA[Schema- first contract-first modeling of Web Services gives you the ability to model your contracts ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Schema- first contract-first modeling of Web Services gives you the ability to model your contracts with an XML-centric mindset. This process keeps you focused on universally acceptable types and the hierarchical data structures that can be represented in XML.<a id="ctl00_MTContentSelector1_mainContentContainer_ctl12" href="http://msdn.microsoft.com/en-us/magazine/cc301283.aspx"><br />
</a></p>
<p><a href="http://msdn.microsoft.com/en-us/magazine/ee335699.aspx">Schema-based Development with Windows Communication Foundation</a>.</p>
<p><a href="http://msdn.microsoft.com/en-us/magazine/dd347832.aspx">WCF and WF Services in .NET Framework 4.0 and “Dublin”</a>.</p>
<h2 id="id0090155">What about BizTalk Server?</h2>
<div id="id0090156">Another common question is how &#8220;Dublin&#8221; relates to BizTalk Server. In a lot of ways, BizTalk Server inspired many of the features you see in &#8220;Dublin&#8221; today. Although both technologies provide similar management capabilities, there&#8217;s a big difference between the two in terms of their focus. &#8220;Dublin&#8221; adds hosting and management extensions to Windows Server designed specifically for WCF and WF applications, whereas BizTalk Server is focused on application integration with non-Microsoft systems using a variety of different message formats, transports, and mapping techniques.</div>
<div>The primary focus of BizTalk Server has always been and will continue to be integration with non-Microsoft systems (line-of-business applications, legacy systems, RFID devices, and business-to-business protocols). BizTalk Server will remain focused on these core strengths in the years ahead. In general, you&#8217;ll want to continue using BizTalk Server when you&#8217;re focused primarily on these types of enterprise application integration (EAI) scenarios.</div>
<div>However, since many WCF and WF apps don&#8217;t need these kinds of integration capabilities, BizTalk Server can often feel like overkill. This is precisely where &#8220;Dublin&#8221; fits into the picture—as a simpler alternative that provides similar management capabilities. In the end, &#8220;Dublin&#8221; will be more cost-effective for these scenarios than BizTalk Server since the &#8220;Dublin&#8221; extensions will ship as a core part of Windows Server and won&#8217;t require you to buy integration adapters you don&#8217;t need. It&#8217;s likely that a future version of BizTalk Server will build upon the &#8220;Dublin&#8221; extensions in order to leverage the core management investments being made to Windows Server.</div>
<div>

</div>
<div>
<h2 id="id0090005">Moving toward the .NET Framework 4.0</h2>
<div id="id0090006">WCF and WF are complementary technologies. If you are unfamiliar with them, a simple way to think about the pair is: WCF on the outside, WF on the inside. WCF is used to expose the external service interface of an application, and WF is used to describe the internal flow, states, and transitions of an application.</div>
<div>The .NET Framework 3.5 introduced some compelling integration between the two, specifically in the form of the WF Send and Receive activities. With these activities, you can employ WF to simplify the process of coordinating multiple service interactions to fulfill complex, long-running workflows. You can also use these activities to extend the reach of your WF workflows by enabling them with WCF endpoints. This essentially allows you to employ WF as the implementation for your WCF services, what I will call WCF workflow services throughout this article.</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070003">Learning about REST</a></div>
<div>REST is an architectural style that can be used to build software in which clients (user agents) can make requests of services (endpoints). REST is one way to implement a <strong>client-server</strong> architectural style—in fact, REST explicitly builds on the client-server architectural style.                                A man named Roy Thomas Fielding first coined the term REST as a concept in his PhD dissertation</div>
<div>Principles are:</p>
<div id="id0070007">
<ul>
<li>User agents interact with <span style="color:#ff0000;"><strong>resources</strong></span>, and resources are anything that can be named and represented. Each resource can be addressed via a unique Uniform Resource Identifier (URI).</li>
<li>Interaction with resources (located through their unique <span style="color:#ff0000;">URIs</span>) is accomplished using a uniform interface of the HTTP standard <span style="color:#ff0000;">verbs </span>(GET, POST, PUT, and DELETE). Also important in the interaction is the declaration of the resource&#8217;s media type, which is designated using the HTTP Content-Type header. (XHTML, XML, JPG, PNG, and JSON are some well-known media types.)</li>
<li>Resources are <span style="color:#ff0000;">self-descriptive</span>. All the information necessary to process a request on a resource is contained inside the <span style="color:#ff0000;">request </span>itself (which allows services to be <span style="color:#ff0000;">stateless</span>).</li>
<li>Resources contain links to other resources (hyper-media).</li>
</ul>
</div>
</div>
<div>
<table border="0">
<tbody>
<tr>
<td>Figure 1 Operating system support</td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<td>Resource</td>
<td>URI</td>
<td>Verbs</td>
</tr>
<tr>
<td>All years</td>
<td>&#8220;/ &#8220;</td>
<td>GET</td>
</tr>
<tr>
<td>A particular year&#8217;s issues</td>
<td>&#8220;/{year}&#8221;</td>
<td>GET, PUT</td>
</tr>
<tr>
<td>A particular issue</td>
<td>&#8220;/{year}/{issue}&#8221;</td>
<td>GET, PUT</td>
</tr>
<tr>
<td>An article</td>
<td>&#8220;/{year}/{issue}/{article}&#8221;</td>
<td>GET, POST (the article number will be assigned by the system), PUT, DELETE (delete would be turned off once an issue has been published)</td>
</tr>
</tbody>
</table>
</div>
<div>(<a href="http://ics.uci.edu/%7Efielding/pubs/dissertation/top.htm">&#8220;Architectural Styles and the Design of Network-based Software Architectures</a>&#8220;).</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070023">Why Should You Care about REST?</a></div>
<div>you likely have used another architectural style: remote procedure call (RPC). Whether you have used proprietary RPC systems such as DCOM or .NET Remoting, or used interoperable RPC technologies such as SOAP using ASMX or WCF, these are the implementations of the client-server style we&#8217;ve had on the Microsoft platform. So why learn or use REST?</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070034">WCF and REST</a></div>
<div>pieces of infrastructure that you had to build to make REST work with the .NET Framework 3.0. Both a programming model and those pieces of infrastructure were added to WCF in the .NET Framework 3.5 in the System.ServiceModel.Web assembly.</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070038">WebGetAttribute and WebInvokeAttribute</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070046">UriTemplate and UriTemplateTable</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070050">WebHttpBinding and WebHttpBehavior</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#id0070063">WebServiceHost and WebServiceHostFactory</a></div>
<div>This is the base set of WCF features that enable the REST architectural style to be used in your .NET applications with ease. This base enables other interesting technologies, including things such as Web Feeds (RSS and Atom) and support for JSON-encoded resources for interaction with AJAX.</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070002">Which is better, REST or SOAP?</a></div>
<div>REST is an architectural style for building <strong>client-server </strong>applications. SOAP is a protocol specification for exchanging data between two endpoints.</div>
<div>Comparing REST with the remote procedure call (RPC) style of building client-server applications would be more accurate. RPC is a style (rather than a protocol, which is what SOAP is) of building client-server applications in which a proxy (generally generated from metadata) is used in the client&#8217;s address space to communicate with the server and the proxy&#8217;s interface mimics the server&#8217;s interface. Although SOAP doesn&#8217;t require the RPC style, most modern SOAP toolkits are geared toward (at least they default to) using RPC.</div>
<div>In contrast to RPC, REST lacks the metadata-generated proxy (see the next question for more information), which means that the client is less coupled to the service. Also, because REST relies on the semantics of HTTP, requests for data (GET requests) can be cached. RPC systems generally have no such infrastructure (and even when performing RPC using SOAP over HTTP, SOAP responses can&#8217;t be cached because SOAP uses the HTTP POST verb, which is considered unsafe). SOAP intentionally eschews HTTP, specifically to allow SOAP to work over other protocols, so it&#8217;s actually a little disingenuous to call SOAP-based services Web services.</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070007">What about security? Isn&#8217;t SOAP more secure than REST?</a></div>
<div>The simple idea behind <strong>federated identity</strong> is to create trust between two companies, where authenticated users from one company can be trusted and considered authenticated by another company without the second company having to maintain the authentication information (username and password, typically). The various WS-* specifications have implementations from all the major vendors, and Microsoft is integrating the ideas into <strong>Active Directory </strong>through <span style="color:#ff0000;">Active Directory Federation Services </span>(ADFS).</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070012">What about transactions?</a></div>
<div><span style="color:#ff0000;"><strong>WS-Atomic Transactions </strong></span>supports distributed, <span style="color:#0000ff;">two-phase commi</span>t transactional semantics over SOAP-based services. REST has <span style="color:#0000ff;">no </span>support for distributed transactions.</div>
<div>In defense of REST, I think it is fair to say that given today&#8217;s distributed, service-oriented architectures, coupling two endpoints so tightly using a distributed transaction may not be the best design. On the other hand, some situations call for this type of functionality, and if you need it, use SOAP and <span style="color:#ff0000;">WS-Atomic Transactions</span>.</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070018">What about interoperability? Isn&#8217;t SOAP supposed to be about interoperability? Isn&#8217;t SOAP more interoperable than REST?</a></div>
<div>REST has the advantage because all you need to use REST is an HTTP stack (either on the client or the server).</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070024">But what about metadata? So what if REST is so interoperable—there&#8217;s no WSDL with REST, and without WSDL, I can&#8217;t generate a client-side proxy to call a service. REST is hard to use.</a></div>
<div><a href="http://codeplex.com/aspnet/Wiki/View.aspx?title=WCF%20REST">Windows Communication Foundation (WCF) REST starter kit</a>, includes facilities that head in this direction. The new <strong>HttpClient</strong> API makes using HTTP much easier than using the .NET <span style="color:#ff0000;">WebRequest/WebResponse </span>API. Also, there is a new Paste as XML Serializable tool, which allows you to copy a piece of XML (say from the documentation of a RESTful endpoint) and generate a <span style="color:#ff0000;">.NET type</span> that can represent that XML instance in your application. This is similar to what the WCF tools do automatically for the whole service with WSDL.</div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070031">What if I want to use a transport other than HTTP?</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070034">After all that information, aren&#8217;t you telling me that REST is good for Internet-facing applications, and SOAP for enterprise applications?</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd942839.aspx#id0070039">Bottom Line</a></div>
<div>When I think of enterprise applications, I often think of <strong>speed </strong>and <span style="color:#ff0000;"><strong>scalability</strong></span>—scalability being one of the main differences between REST and SOAP. SOAP services are much harder to scale than RESTful services, which is, of course, one of the reasons that REST is often chosen as the architecture for services that are exposed via the Internet (like Facebook, MySpace, Twitter, and so on).</div>
<div>
<div id="id0070038">Inside enterprises, applications also often need to <strong>scale </strong>as well. Using REST means that you can take advantage of HTTP <span style="color:#ff0000;"><strong>caching </strong></span>and other features, like <span style="color:#ff0000;">Conditional GET</span>, that aid in scaling services. Many of these techniques can&#8217;t be used with SOAP because SOAP uses POST only over HTTP.</div>
<div></div>
<div><a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430012">Trouble with 2-Tier</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430018">WCF and 3-Tier</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430036">Scalability Problems</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430043">Trouble in Paradise</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430051">Occasional Connectivity Affects Servers</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430057">Threading and Usability</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430063">Client-side WCF</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430078">Object-Graph Dependencies</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430088">Synchronization Domains</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430101">View-Controller Interaction</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430107">Thread-Safe Data Binding</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430125">Two-way DataBinding</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430165">Client-side Repositories</a><br />
<a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx#id0430183">Performance</a></div>
<div></div>
<div>WCF callback contracts, see Juval Lowy&#8217;s article from the October 2006 issue, &#8220;<a href="http://msdn.microsoft.com/magazine/cc163537">What You Need To Know About One-Way Calls, Callbacks, And Events</a>.&#8221;)</div>
<div></div>
<div>on how to use WCF in smart client environments (see &#8220;<a href="http://msdn.microsoft.com/library/cc294424">Writing Smart Clients by Using Windows Communication Foundation</a>&#8220;)</div>
</div>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Reflection in Actionscript 3.0. The lost concept!]]></title>
<link>http://apslab.wordpress.com/2009/10/02/reflection-in-actionscript-3-0-the-lost-concept/</link>
<pubDate>Fri, 02 Oct 2009 05:49:57 +0000</pubDate>
<dc:creator>creative3d</dc:creator>
<guid>http://apslab.wordpress.com/2009/10/02/reflection-in-actionscript-3-0-the-lost-concept/</guid>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[<div class='snap_preview'></div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BlazeDs - HelloWorld Example ]]></title>
<link>http://upog.wordpress.com/2009/08/22/blazeds-helloworld-example/</link>
<pubDate>Sat, 22 Aug 2009 19:25:57 +0000</pubDate>
<dc:creator>upog</dc:creator>
<guid>http://upog.wordpress.com/2009/08/22/blazeds-helloworld-example/</guid>
<description><![CDATA[BlazeDS is a server-based Java remoting technology that allows you to connect to back-end distribute]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>BlazeDS is a server-based Java remoting technology that allows you to connect to back-end distributed data and push data in real-time to Adobe Flex and Adobe AIR rich Internet applications (RIA).</p>
<p>You can get more information on BlazeDs on the following link  <a href="&#60;/a">&#8220;http://livedocs.adobe.com/blazeds/1/blazeds_devguide/&#8221;&#62;</a></p>
<p>Below Are the steps to configure and run a Sample Program Using BlazeDS</p>
<p>Requirement:</p>
<p><a href="http://tomcat.apache.org/download-60.cgi">Apache-tomcat-6.0.18 </a>(download zip (pgp, md5) )</p>
<p><a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3">FlexBuilder</a></p>
<p>Step1:<br />
Create a folder named BlazeDs in ${Tomcat}/webapps</p>
<p>Step2:<br />
Download the BlazeDS Binaries from the following link<br />
<a href="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds"> Download the BlazeDS binary distribution </a>and extract it to ${Tomcat}/webapps/BlazeDs</p>
<p>step3:<br />
Create a java Program &#8220;HelloWorld.java&#8221; in ${tomcat}\webapps\BlazeDs\WEB-INF\classes location</p>
<p>      public class HelloWorld</p>
<p>      {<br />
           public HelloWorld(){}<br />
           public String sayHello()<br />
                  {<br />
                         return &#8220;Hello World. It&#8217;s Working&#8221;;<br />
                   }<br />
      }<br />
compile and create the class file in the same location</p>
<p>step4:</p>
<p>Add the Following node in ${tomcat}\webapps\BlazeDs\WEB-INF\flex\remoting-config.xml</p>
<p>&#60;service id=&#8221;remoting-service&#8221;  class=&#8221;flex.messaging.services.RemotingService&#8221;&#62;<br />
. . .<br />
. . .</p>
<p>&#60;destination id=&#8221;HelloWorld&#8221;&#62;<br />
&#60;properties&#62;<br />
&#60;source&#62;HelloWorld&#60;/source&#62;<br />
&#60;/properties&#62;<br />
&#60;/destination&#62;</p>
<p>. . .<br />
. . .</p>
<p>&#60;/service&#62;</p>
<p>Step5:<br />
Create a new Project(name &#8220;BlazeDS&#8221;) using Flex Builder.</p>
<p>Copy and Paste the below code in BlazeDs.mxml</p>
<p>&#60;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&#62;<br />
&#60;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; layout=&#8221;horizontal&#8221; &#62;<br />
&#60;mx:RemoteObject id=&#8221;ro&#8221; destination=&#8221;HelloWorld&#8221; result=&#8221;resultHandler(event)&#8221; fault=&#8221;faultHandler(event)&#8221;/&#62;<br />
&#60;mx:Panel x=&#8221;10&#8243; y=&#8221;10&#8243; width=&#8221;604&#8243; height=&#8221;643&#8243; layout=&#8221;absolute&#8221; backgroundColor=&#8221;#DFE8EC&#8221; cornerRadius=&#8221;6&#8243; alpha=&#8221;1.0&#8243; backgroundAlpha=&#8221;0.52&#8243; borderStyle=&#8221;inset&#8221; fontWeight=&#8221;bold&#8221; themeColor=&#8221;#1611EF&#8221; color=&#8221;#1B3DE8&#8243;&#62;<br />
&#60;mx:TextArea id=&#8221;text&#8221; text=&#8221;initial text&#8221; x=&#8221;240&#8243; y=&#8221;61&#8243; width=&#8221;273&#8243; height=&#8221;56&#8243;/&#62;<br />
&#60;mx:Text x=&#8221;62&#8243; y=&#8221;10&#8243; text=&#8221;Blaze DS Example&#8221; width=&#8221;431&#8243; height=&#8221;28&#8243; fontFamily=&#8221;Georgia&#8221; fontSize=&#8221;15&#8243; alpha=&#8221;0.58&#8243; color=&#8221;#389AAF&#8221; textAlign=&#8221;center&#8221; fontWeight=&#8221;bold&#8221; fontStyle=&#8221;italic&#8221;/&#62;<br />
&#60;mx:Button x=&#8221;244&#8243; y=&#8221;152&#8243; label=&#8221;Click Me&#8221; fontStyle=&#8221;italic&#8221; themeColor=&#8221;#0B0BF6&#8243; borderColor=&#8221;#291AE6&#8243; click=&#8221;ro.sayHello()&#8221; /&#62;<br />
&#60;mx:Label x=&#8221;32&#8243; y=&#8221;62&#8243; text=&#8221;Data Returned from the server &#8221; width=&#8221;189&#8243; color=&#8221;#5BA9BA&#8221;/&#62;<br />
&#60;mx:Button x=&#8221;338&#8243; y=&#8221;152&#8243; label=&#8221;Reset&#8221; fontStyle=&#8221;italic&#8221; themeColor=&#8221;#0B0BF6&#8243; borderColor=&#8221;#291AE6&#8243; click=&#8221;reset()&#8221;  width=&#8221;62&#8243;/&#62;<br />
&#60;/mx:Panel&#62;</p>
<p>&#60;mx:Script&#62;<br />
&#60;![CDATA[</p>
<p>import mx.controls.Alert;</p>
<p>import mx.rpc.events.ResultEvent;</p>
<p>import mx.rpc.events.FaultEvent;</p>
<p>import mx.utils.ObjectUtil;</p>
<p>import mx.utils.StringUtil;</p>
<p>var str:String</p>
<p>private function resultHandler(event:ResultEvent):void</p>
<p>{</p>
<p>text.text= ObjectUtil.toString(event.result)</p>
<p>}</p>
<p>private function faultHandler(event:FaultEvent):void</p>
<p>{</p>
<p>Alert.show( ObjectUtil.toString(event.fault) );</p>
<p>}</p>
<p>public function reset():void{</p>
<p>text.text="initial text";</p>
<p>}</p>
<p>]]&#62;<br />
&#60;/mx:Script&#62;</p>
<p>&#60;/mx:Application&#62;</p>
<p>set the Additional compiler arguments for Flex Compiler</p>
<p>-services ${tomcat}\webapps\BlazeDS\WEB-INF\flex\services-config.xml -context-root /BlazeDs</p>
<p>Clean and build the Project again</p>
<p>now copy and paste the generated output files BlazeDS.html , BlazeDS.swf and AC_OETags files to ${tomcat}\webapps\BlazeDS\</p>
<p>Step6:</p>
<p>Stop and Start your tomcat server</p>
<p>Hit The Following URL</p>
<p>http://localhost:8080/BlazeDs/BlazeDS.swf  (or)</p>
<p>http://localhost:8080/BlazeDs/BlazeDS.html</p>
<p><img class="aligncenter size-full wp-image-45" title="output" src="http://upog.wordpress.com/files/2009/08/output2.jpg" alt="output" width="602" height="248" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Включаем PowerShell Remoting через групповые политики.]]></title>
<link>http://xaegr.wordpress.com/2009/08/14/group_policy_remoting_configuration/</link>
<pubDate>Fri, 14 Aug 2009 11:45:19 +0000</pubDate>
<dc:creator>Xaegr</dc:creator>
<guid>http://xaegr.wordpress.com/2009/08/14/group_policy_remoting_configuration/</guid>
<description><![CDATA[Windows 7 и Windows Server 2008 R2 уже в состоянии RTM, а в них уже встроен PowerShell v2.0. Соответ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Windows 7 и Windows Server 2008 R2 уже в состоянии RTM, а в них уже встроен PowerShell v2.0. Соответственно, самые прогрессивные администраторы уже смогут использовать PowerShell Remoting в реальном, не тестовом окружении. </p>
<p>Так как в целях безопасности Remoting разумеется отключён в конфигурации по умолчанию, то надо будет его включить. Сделать это можно с помощью командлета Enable-PSRemoting (причем надо выполнить его и на управляющем и управляемом компьютерах). Чтобы командлет не задавал лишних вопросов, достаточно добавить к нему ключ –Force.</p>
<p>Но как я уже сказал выше, время тестирования заканчивается, и скоро нам понадобится включать Remoting на множестве наших компьютеров. Enable-PSRemoting для этого уже мало подходит. Можно конечно включить его в сценарий загрузки компьютера, но это мягко говоря не эффективно. </p>
<p>И тут нам на помощь, приходят старые добрые групповые политики <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  К сожалению (или к счастью?) галочка “сделать чтоб ремотинг заработал” отсутствует <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Так что с помощью групповой политики придётся произвести несколько отдельных настроек. </p>
<p>Во-первых надо создать “Listener”, так называемый “слушатель”, который будет принимать входящие подключения WinRM на определённый порт, с определёнными настройками. Listener’ов можно создать несколько, назначить различные разрешения на подключения к ним, порты, параметры безопасности, и ограничения. Но мы сейчас ограничимся созданием простого “слушателя” с настройками по умолчанию. Он будет принимать подключения от пользователей с административными полномочиями, на порт 5985. Создать его легко с помощью административных шаблонов групповой политики: Computer Configuration / Policies / Administrative Templates / Windows Components / Windows Remote Management (WinRM) / WinRM Service. Тут, в элементе Allow automatic configuration of listeners можно разрешить автоматическое создание “слушателя” по умолчанию, и указать для него диапазоны адресов с которых он будет принимать подключения (ipv4 и ipv6). Впрочем можно разрешить подключения отовсюду, поставив звёздочку (*). Рядом можно изменить некоторые другие настройки WinRM, или включить Listener’ы слушающие на портах 80 и 443 (Turn On Compatibility HTTP(S) Listener), стандартных для HTTP и HTTPS.</p>
<p><a href="http://xaegr.files.wordpress.com/2009/08/psr_listener1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="psr_listener" border="0" alt="psr_listener" src="http://xaegr.files.wordpress.com/2009/08/psr_listener_thumb1.png?w=391&#038;h=394" width="391" height="394" /></a> </p>
<p>Ну и последняя настройка – разрешить подключения на соответствующий порт, в Windows Firewall. Делается это тоже с помощью групповых политик, в узле Computer Configuration / Policies / Windows Settings / Security Settings / Windows Firewall with Advanced Security / Inbound Rules.</p>
<p>Здесь просто нужно с помощью мастера, создать правило разрешающее подключение на соответствующие порты. Для этого можно использовать предустановленное правило Windows Remote Management.</p>
<p><a href="http://xaegr.files.wordpress.com/2009/08/psr_fw1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="psr_fw" border="0" alt="psr_fw" src="http://xaegr.files.wordpress.com/2009/08/psr_fw_thumb1.png?w=419&#038;h=339" width="419" height="339" /></a> </p>
<p>Всё, теперь останется лишь подождать применения этой политики на компьютеры.</p>
<p>Ну и напоследок, файлы встроенной справки по Remoting’у:</p>
<pre>PS C:\&#62; get-help about_remote* &#124; Format-Table Name, Synopsis -AutoSize

Name                         Synopsis
----                         --------
about_remote                 Describes how to run remote commands in Windows PowerShell.
about_remote_FAQ             Contains questions and answers about running remote commands
about_remote_jobs            Describes how to run background jobs on remote computers.
about_remote_output          Describes how to interpret and format the output of remote commands.
about_remote_requirements    Describes the system requirements and configuration requirements for
about_remote_troubleshooting Describes how to troubleshoot remote operations in Windows PowerShell.</pre>
<p>Очень рекомендую с ними ознакомится.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[.Net Remoting Interview Question]]></title>
<link>http://mkansagarfa.wordpress.com/2009/07/31/net-remoting-interview-question/</link>
<pubDate>Fri, 31 Jul 2009 15:35:19 +0000</pubDate>
<dc:creator>mkansagarfa</dc:creator>
<guid>http://mkansagarfa.wordpress.com/2009/07/31/net-remoting-interview-question/</guid>
<description><![CDATA[# What’s a Windows process? It’s an application that’s running and had been allocated memory. # What]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p># What’s a Windows process?<br />
It’s an application that’s running and had been allocated memory.</p>
<p># What’s typical about a Windows process in regards to memory allocation?<br />
Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.</p>
<p># Explain what relationship is between a Process, Application Domain, and Application?<br />
A process is an instance of a running application. An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application.</p>
<p># What are possible implementations of distributed applications in .NET?<br />
.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.</p>
<p># What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?<br />
Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of informaion. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.</p>
<p># What’s a proxy of the server object in .NET Remoting?<br />
It’s a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the communication between real server object and the client object. This process is also known as marshaling.</p>
<p># What are remotable objects in .NET Remoting?<br />
Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.</p>
<p># What are channels in .NET Remoting?<br />
Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.</p>
<p># What security measures exist for .NET Remoting in System.Runtime.Remoting?<br />
None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level.</p>
<p># What is a formatter?<br />
A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.</p>
<p># Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?<br />
Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.</p>
<p># What’s SingleCall activation mode used for?<br />
If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.</p>
<p># What’s Singleton activation mode?<br />
A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease.</p>
<p># How do you define the lease of the object?<br />
By implementing ILease interface when writing the class code.</p>
<p># Can you configure a .NET Remoting object via XML file?<br />
Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.</p>
<p># How can you automatically generate interface for the remotable object in .NET with Microsoft tools?<br />
Use the Soapsuds tool.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Remoting in Seam aktivieren]]></title>
<link>http://codingtemple.wordpress.com/2009/07/23/remoting-in-seam-aktivieren/</link>
<pubDate>Thu, 23 Jul 2009 12:18:51 +0000</pubDate>
<dc:creator>ct</dc:creator>
<guid>http://codingtemple.wordpress.com/2009/07/23/remoting-in-seam-aktivieren/</guid>
<description><![CDATA[Seam bietet natürllich auch die Möglichkeit eines EventAustauschs zwischen mehreren Clients. Dazu wi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Seam bietet natürllich auch die Möglichkeit eines EventAustauschs zwischen mehreren Clients. Dazu wird Remoting in Verbindung mit JavaScript eingesetzt.</p>
<p><!--more-->Ein Beispiel zur Implementierung ist bei Seam bereits enthalten: Der<em> Chatroom</em></p>
<p>Allerdings ist dieser nicht zwangsläufig lauffähig, wenn man ihn denn in ein eigenes Projekt portieren möchte. Da unsere User aber später vielleicht ja auch miteinander chatten möchten, wäre die Funktionalität doch wünschenswert.</p>
<p>Diese kleine Doku setzt das Beispiel <em>Chatroom</em> aus Seam vorraus. Alle passenden Java-Dateien sollten sich dazu im Ordner <strong><em>main</em></strong> befinden, den Rest der Konfiguration gehen wir jetzt durch:</p>
<p>In meinem Fall ließen sich die Sourcen nicht fehlerfrei übersetzen. Dazu fehlten noch zwei Bibliotheken, die in das Projekt mit eingebunden werden müssen. Diese sind wie die anderen Bibliotheken auch zu finden. Es sind<em> jms.jar </em> &#38; <em>jboss-seam-remoting.jar. </em>Eingebunden werden diese über <em>Project &#8211;&#62; Properties &#8211;&#62; Java Sources Classpath &#8211;&#62;Add</em> JAR/Folder&#8230;</p>
<p>Ich hatte in meiner Konfiguration insbesondere Probleme mit dem Cache, daher habe ich diesen zunächst entfernt. Statt dessen muss man sich etwas anderes einfallen lassen, um die Benutzerliste aktuell zu halten. Ich bin da für ein Objekt, dass den Scope-Type Application hat und damit ebenfalls die Liste im Speicher halten kann.</p>
<p>Folgendes müssen wir in die<em> components.xml </em>einfügen:</p>
<blockquote>
<pre>&#60;component name="topicPublisher" auto-create="true"&#62;
 &#60;property name="topicJndiName"&#62;topic/chatroomTopic&#60;/property&#62;
 &#60;/component&#62;

 &#60;component installed="true"&#62;
 &#60;property name="allowedTopics"&#62;chatroomTopic&#60;/property&#62;
 &#60;/component&#62;

 &#60;component name="org.jboss.seam.remoting.remoting"&#62;
 &#60;property name="debug"&#62;false&#60;/property&#62;
 &#60;property name="pollTimeout"&#62;2&#60;/property&#62;
 &#60;property name="pollInterval"&#62;1&#60;/property&#62;
 &#60;/component&#62;</pre>
</blockquote>
<p>Anschließend muss die passende Service-Datei (im Beispiel <em>jboss-seam-chatroom-service.xml</em>) in das Projektverzeichnis kopiert werden und folgende Zeilen in die <em>web.xml</em> eingefügt werden.</p>
<blockquote>
<pre>&#60;servlet&#62;
 &#60;servlet-name&#62;Seam Remoting&#60;/servlet-name&#62;
 &#60;servlet-class&#62;org.jboss.seam.remoting.SeamRemotingServlet&#60;/servlet-class&#62;
 &#60;/servlet&#62;

 &#60;servlet-mapping&#62;
 &#60;servlet-name&#62;Seam Remoting&#60;/servlet-name&#62;
 &#60;url-pattern&#62;/seam/remoting/*&#60;/url-pattern&#62;
 &#60;/servlet-mapping&#62;</pre>
</blockquote>
<p>Jetzt sollte  das Remoting funktionieren&#8230;</p>
<p>Sobald ich dann herausgefunden habe, wie der Cache problemlos aktiviert werden kann, werde ich das natürlich nachreichen &#8211; denn sonst hängen unsere User als Dateileichen im Chat herum&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[.NET Remoting TcpChannel, multi-homed Server]]></title>
<link>http://candritzky.wordpress.com/2009/05/08/net-remoting-tcpchannel-multi-homed-server/</link>
<pubDate>Fri, 08 May 2009 11:47:43 +0000</pubDate>
<dc:creator>candritzky</dc:creator>
<guid>http://candritzky.wordpress.com/2009/05/08/net-remoting-tcpchannel-multi-homed-server/</guid>
<description><![CDATA[In einem aktuellen Projekt bestand das Problem, dass wir einen .NET Remoting Server implementiert ha]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In einem aktuellen Projekt bestand das Problem, dass wir einen .NET Remoting Server implementiert hatten, der den TcpChannel als Transport verwendet. Das Problem entstand dadurch, dass der Server mit mehreren Netzwerkadaptern (LAN und WLAN) ausgestattet war und die IP-Adresse des WLAN-Adapters sich dynamisch ändert weil der Server auf einem mobilen Gerät läuft, das herum getragen wird (&#8220;roaming users&#8221;) und sich mit verschiedenen WLAN-(Sub)netzen verbindet. All das wäre noch kein Problem wenn es im Netzwerk des Kunden einen DNS-Server gäbe. In diesem Fall könnte man den TcpChannel so konfigurieren, dass er den Rechnernamen des mobilen Servers für die Bindung der Proxies verwendet. Da aber kein DNS zur Verfügung steht, mussten wir auf die Option useIpAddress=&#8221;true&#8221; ausweichen. Dadurch entstand eine Reihe von Problemen:</p>
<ol>
<li>Wenn beim Start des Systems (Windows XP Embedded) kein Netzwerkkabel angesteckt ist und kein WLAN verfügbar ist, wird der Maschine keine IP-Adresse zugewiesen. Eine Kommunikation mit dem Gerät über den .NET Remoting TcpChannel ist dann auch nach dem Herstellen einer Netzwerkverbindung nicht möglich (der .NET Remoting Server läuft als Win32 Service und wird beim Systemstart automatisch gestartet).</li>
<li>Wenn sich die IP-Adresse des WLAN-Adapters zur Laufzeit des .NET Remoting Service ändert, dann war keine Kommunikation mit dem .NET Remoting Service möglich. Selbst dann nicht, wenn der Client neu gestartet wurde. Der Client kennt zwar die neue IP-Adresse und kann den Server anpingen und sogar eine TCP Verbindung zum .NET Remoting Interface herstellen, eine Kommunikation über das .NET Remoting Protokoll war jedoch nicht möglich.</li>
</ol>
<p>Ursächlich hierfür ist die Implementierung des TcpChannels im .NET Framework (2.0 SP1, neuere Versionen sind aber auch nicht besser). Bereits beim Registrieren des TcpChannels (z. B. via RemotingConfiguration.Configure) werden die IP-Adressen des Hosts ermittelt und der TcpChannel wird an die erstbeste(!) IP-Adresse (und zwar nur an diese!) gebunden. Diese Bindung bleibt bis zum Ende des Prozesses bestehen. Sie passt sich nicht dynamisch an. Ein nachträgliches Umkonfigurieren ist nicht möglich da die Klasse TcpChannel hierfür keine Properties/Methoden zur Verfügung stellt. Selbst ein explizites Deregistrieren (ChannelServices.UnregisterChannel) mit anschließender Neuinstanziierung und Neuregistrierung (ChannelServices.RegisterChannel) des TcpChannels ist nicht möglich weil das .NET Framework die Registrierung eines TcpChannels nur ein einziges Mal zulässt (warum?).</p>
<p>Zur Lösung des Problems haben wir eine eigene Implementierung des TcpChannels erstellt. Als Vorlage diente der Sourcecode von mono 2.4. Damit war es möglich, den TcpChannel zu de- und anschließend wieder zu registrieren. Im Gegensatz zum Standard-TcpChannel aus dem .NET Framework liefert unser TcpChannel nicht nur eine einzige URI für ein Objekt, sondern eine <u>Liste</u> von URIs, die einen Eintrag für jede dem System zugewiesene IP-Adresse (gefiltert auf IPv4) liefert. Parallel dazu haben wir einen &#8220;TcpAddressMonitor&#8221; implementiert, der die dem System aktuell zugewiesenen IP-Adressen überwacht (mittels Polling im 5 s Takt) und bei einer Änderung den TcpChannel deregistriert, eine neue Instanz erstellt und diese wieder registriert. Damit waren sowohl das Problem mit nicht vorhandenen IP-Adressen beim Systemstart als auch das Roaming-Problem gelöst.</p>
<p>Allerdings wurden nun Exceptions, die beim Aufruf von Server-Methoden auftraten, nicht mehr an den Client durchgereicht. Die Option RemotingConfiguration.CustomErrorsMode=CustomErrorsMode.Off wurde ignoriert. Clientseitig kam lediglich eine RemotingException mit der Message &#8220;Server encountered an internal error&#8221; an. Die Lösung für dieses Problem fand sich <a href="http://www.cookcomputing.com/blog/archives/000342.html">hier</a>: Es muss im TcpChannel der RequestHeader <strong>__CustomErrorsEnabled=false</strong> gesetzt werden. Auf diese Lösung bin ich nur dadurch gekommen, dass ich mir den gesamten verfügbaren .NET Sourcecode über den <a href="http://netmassdownloader.codeplex.com">NetMassDownloader</a> heruntergeladen und nach &#8220;customErrors&#8221; durchsucht habe.</p>
<p>Update, 13.05.2009: So ganz hat der oben beschriebene Weg doch nicht funktioniert. Wie sich gezeigt hat, gibt es Probleme mit bereits gemarshalten Objekt-Referenzen (ObjRef) wenn der TcpChannel neu registriert wird. Die Referenzen werden dann ungültig. Da hilft nicht einmal ein Neustart der Clients. Anhand eines Analyse des Quellcodes habe ich folgendes gelernt:</p>
<p>1. Jeder Channel enthält eine Liste von URIs (beim TcpChannel wird die Liste von der internen Klasse TcpServerChannel verwaltet).</p>
<p>2. Jede Objekt-Referenz enthält eine Liste von URIs (z. B. &#8220;tcp://hostname:port/xxxxxx.rem&#8221;).</p>
<p>Wird eine Referenz zum ersten Mal gemarshalt, wird ein ObjRef Objekt erzeugt. Dabei wird die Liste aller URIs aller in .NET Remoting registrierten Channels in das ObjRef Objekt kopiert.</p>
<p>Um unser Problem der sich ändernden IP-Adressen zu lösen, war nun folgendes nötig sobald sich die IP-Adressliste des Hosts geändert hat:</p>
<p>1. Die URI-Liste jedes TcpChannels muss aktualisiert werden.</p>
<p>2. Die URI-Liste sämtlicher Objekt-Referenzen muss aktualisiert werden.</p>
<p>Das ließ sich folgendermaßen implementieren:</p>
<p>1. Die Liste aller registrierten TcpChannels erhält man über ChannelServices.RegisteredChannels. Mit Hilfe von &#8220;&#8230; is TcpChannel&#8221; wird überprüft, ob es sich um einen Channel vom Typ TcpChannel handelt. Um den TcpChannel aktualisieren zu können, wurde eine public Methode UpdateChannelData() hinzugefügt. Diese delegiert einfach an eine ebenfalls neue Methode UpdateChannelData() des internen TcpServerChannels. Damit waren die URIs des TcpChannels aktualisiert, was allerdings nur Auswirkungen auf zukünftige gemarshalte Objekt-Referenzen hat.</p>
<p>2. Die bereits gemarshalten Objekt-Referenzen können aktualisiert werden, indem die Schnittstelle ITrackingHandler von einer Klasse TrackingHandler implementiert wurde, und eine entsprechede Instanz beim TrackingService registriert wurde. ITrackingHandler wird benachrichtigt, wann immer eine Objekt-Referenz gemarshalt, unmarshalt oder disconnected wird. Beim Marshaling vermerkt unsere Klasse die erzeugte Objekt-Referenz in einer Liste, beim Disconnect wird die Objekt-Referenz aus der Liste entfernt. Anhand dieser Liste lässt sich leicht über alle bereits gemarshalten Objekt-Referenzen iterieren und deren URIs aktualisieren.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Remoting using Yuuguu]]></title>
<link>http://anitzageneve.wordpress.com/2009/04/21/remoting-using-yuuguu/</link>
<pubDate>Tue, 21 Apr 2009 09:39:52 +0000</pubDate>
<dc:creator>anitzageneve</dc:creator>
<guid>http://anitzageneve.wordpress.com/2009/04/21/remoting-using-yuuguu/</guid>
<description><![CDATA[http://www.news.com.au/technology/story/0,,24510547-5014118,00.html]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.news.com.au/technology/story/0,,24510547-5014118,00.html">http://www.news.com.au/technology/story/0,,24510547-5014118,00.html</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Fileupload using Zend AMF, RemoteObject and Flash 10]]></title>
<link>http://gertonscorner.wordpress.com/2009/04/19/fileupload-using-zend-amf-remoteobject-and-flash-10/</link>
<pubDate>Sun, 19 Apr 2009 20:12:21 +0000</pubDate>
<dc:creator>Gerton</dc:creator>
<guid>http://gertonscorner.wordpress.com/2009/04/19/fileupload-using-zend-amf-remoteobject-and-flash-10/</guid>
<description><![CDATA[In one of my earlier posts i described a method for uploading files using the RemoteObject class fou]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In one of my <a title="Fileupload using AMFPHP, RemoteObject and Flash 10" href="http://gertonscorner.wordpress.com/2009/03/15/fileupload-using-amfphp-remoteobject-and-flash-10/">earlier posts</a> i described a method for uploading files using the RemoteObject class found in the Flex SDK. For the &#8220;back end&#8221; i used the still very popular <a title="AMFPHP remoting" href="http://www.amfphp.org/docs2/index.html" target="_blank">amfphp</a> implementation of the AMF protocol.</p>
<p><a title="Wade Arnold blog" href="http://wadearnold.com/blog/" target="_blank">Wade Arnold</a> the maintainer of amfphp is also involved in another implementation of the AMF protocol which is shipped with the <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a>. After reading some blog posts about this &#8220;new&#8221; package called Zend_Amf, i decided to give it a try.</p>
<p>Download <a title="Full example code" href="http://gertonscorner.googlecode.com/files/ZendAMFUpload.zip">ZendAMFUpload.zip</a> for full example code.<br />
<!--more--><br />
I started my quest with downloading of the latest <a title="Zend Framework library" href="http://www.zendframework.com/releases/ZendFramework-1.7.8/ZendFramework-1.7.8.zip">Zend Framework library</a>, which is now at version 1.7.8 and followed the instructions of the Quickstart guide, which can be found <a title="Zend Framework Quickstart guide" href="http://framework.zend.com/docs/quickstart" target="_blank">here</a>.</p>
<p>I also found a <a title="Zend_Amf with full Zend Framework" href="http://www.riaspace.net/2009/01/zend_amf-with-full-zend-framework/" target="_blank">great post</a> from Piotr Walczyszyn about how to merge the Zend_Amf package within the Zend Framework MVC structure and i used this approach as a starting point for my own example, but made the following changes compared to the tutorial of Piotr:</p>
<p>1)<br />
Because i don&#8217;t use a database within my example i removed all code related to the config, database and registry from my bootstrap.php file.</p>
<p>2)<br />
Somehow the disableLayout call in the MessageBrokerController init function Piotr provided resulted in an error, so i removed this line.</p>
<p>3)<br />
Instead of putting my data objects into a dto folder i used a folder named vo. It is the same, but i am used to call my remote data objects Value Objects.</p>
<p>4)<br />
During my quest i stumbled to some strange behaviour when sending Typed Objects (FileVO) from my flex client to the service layer. According to the Zend_Amf documentation you could use $_explicitType within a ValueObject for mapping serverside PHP classes with AS3 classes, but this only worked for retrieving typed objects, not for sending typed objects. Finally i found these issues related to class mapping of typed objects: <a href="http://www.zendframework.com/issues/browse/ZF-5755" target="_blank">ZF-5755</a>, <a href="http://www.zendframework.com/issues/browse/ZF-5885">ZF-5885</a> and <a href="http://www.zendframework.com/issues/browse/ZF-6130">ZF-6130</a>, and decided to use the $server-&#62;setClassMap call in my MessagebrokerController.</p>
<p>Here is the code i ended up with:</p>
<p><em>MessagebrokerController.php</em><br />
<code><br />
class MessagebrokerController extends Zend_Controller_Action {<br />
// Initialise controller with no view renderer<br />
public function init()	{<br />
$this-&#62;_helper-&#62;viewRenderer-&#62;setNoRender(true);<br />
}<br />
// amf action<br />
public function amfAction()	{<br />
$server = new Zend_Amf_Server();<br />
$server-&#62;addDirectory(APPLICATION_PATH . '/services/');<br />
// Mapping of PHP FileVO class and AS3 FileVO class<br />
$server-&#62;setClassMap("FileVO", "FileVO");<br />
echo($server-&#62;handle());<br />
}<br />
}<br />
</code></p>
<p><em>FileVO.php</em></p>
<p><code><br />
class FileVO {<br />
public $filename;<br />
public $filedata;<br />
}<br />
</code></p>
<p><em>RemoteFile.php</em></p>
<p><code><br />
class RemoteFile {<br />
/**<br />
* Upload files!<br />
*<br />
* @param  $file as a FileVO Object<br />
* @return string<br />
**/<br />
public function upload($file) {<br />
$data = $file-&#62;filedata;<br />
file_put_contents( APPLICATION_PATH . '/uploads/' . $file-&#62;filename, $data);<br />
return 'File: ' . $file-&#62;filename .' Uploaded ';<br />
}<br />
}<br />
</code></p>
<p>I kept the flex code the same as in my earlier post except for the remote service endpoint url, which should be now something like</p>
<p>http://[some-host]/messagebroker/amf</p>
<p>Download <a title="Full example code" href="http://gertonscorner.googlecode.com/files/ZendAMFUpload.zip">ZendAMFUpload.zip</a> for full example code.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Fileupload using AMFPHP, RemoteObject and Flash 10]]></title>
<link>http://gertonscorner.wordpress.com/2009/03/15/fileupload-using-amfphp-remoteobject-and-flash-10/</link>
<pubDate>Sun, 15 Mar 2009 14:02:27 +0000</pubDate>
<dc:creator>Gerton</dc:creator>
<guid>http://gertonscorner.wordpress.com/2009/03/15/fileupload-using-amfphp-remoteobject-and-flash-10/</guid>
<description><![CDATA[File upload with Adobe Flex is a common asked feature for lots of applications. There are several po]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>File upload  with Adobe Flex is a common asked feature for lots of applications. There are several posts on the internet to be found which explain, in detail, how to do this.</p>
<p>Most of these examples however uses the http protocol to transport the binary data. With the arrival of the Adobe Flash 10 player and the new FileReference features that comes with it, it is now also possible to upload a file via a RemoteObject service call.</p>
<p><!--more--></p>
<p>For the coming example it is assumed that <a title="AMFPHP remoting" href="http://www.amfphp.org/docs2/index.html" target="_blank">amfphp 1.9</a> and Flash player 10 (Flex 3.2 SDK) is installed and running. Furthermore i am using a setup as described in one of my earlier posts about <a title="RemoteObject using AMFPHP and Actionscript 3" href="http://gertonscorner.wordpress.com/2008/09/06/remoteobject-using-amfphp-and-actionscript-3/">RemoteObject and AMFPHP</a>. Download <a title="Full example code" href="http://gertonscorner.googlecode.com/files/PHPUpload.zip">PHPUpload.zip</a> for full example code.</p>
<p>Copy the services contents found in the zip to your amfphp services location (and check the amfphp/globals.php if your &#8220;vo&#8221; location is configurated to &#8220;services/vo/&#8221;).</p>
<p>Within your services directory a RemoteFile.php can be found with a public function upload, which require a parameter of type FileVO:</p>
<p><code><br />
require_once ('./vo/FileVO.php');<br />
class RemoteFile {<br />
/**<br />
* Upload files!<br />
*<br />
* @param  FileVO $file<br />
* @return string<br />
**/<br />
public function upload(FileVO $file) {<br />
$data = $file-&#62;filedata-&#62;data;<br />
file_put_contents( 'uploads/' . $file-&#62;filename, $data);<br />
return 'File: ' . $file-&#62;filename .' Uploaded ';<br />
}<br />
}<br />
</code></p>
<p>The FileVO php class has a Flex counterpart also called FileVO which is used as a so called RemoteClass. This RemoteClass has an attribute for the filename and filedata (ByteArray).</p>
<p>No we are ready to create the service class for the upload example, this class will be named RemoteFileService and extends the RemoteService super class.<code>public class RemoteFileService extends RemoteService {<br />
private static var phpServiceClass:String = "RemoteFile";<br />
//constructor<br />
public function RemoteFileService(amfChannelId:String, amfChannelEndpoint:String) {<br />
super("remotefileService","amfphp", amfChannelId, amfChannelEndpoint);<br />
}<br />
// Upload function<br />
public function upload(file:FileVO):void {<br />
remoteObject.source = phpServiceClass;<br />
remoteObject.upload.addEventListener(<br />
ResultEvent.RESULT,handleRemoteMethod);<br />
remoteObject.upload(file);<br />
}<br />
// Remote result handler<br />
protected function handleRemoteMethod(event:ResultEvent):void {<br />
var uploadStatus:String;<br />
uploadStatus = event.result.toString();<br />
Application.application.dispatchEvent(<br />
new RemoteResultEvent(RemoteResultEvent.UPLOAD_STATUS, uploadStatus));<br />
}<br />
}</code></p>
<p>The Flex application file contains a text component (which will be filled with the selected filename), a button for selecting a file and a button to start the upload. Download <a title="Full example code" href="http://gertonscorner.googlecode.com/files/PHPUpload.zip">PHPUpload.zip</a> for full example code.</p>
<p>After a succesfull upload the selected file will be placed in the amfphp/services/uploads directory (needs write privileges!) and an Alert shows a message from the server.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ASP.NET 기반의 Flash Remoting]]></title>
<link>http://fxdev.wordpress.com/2009/02/20/aspnet-%ea%b8%b0%eb%b0%98%ec%9d%98-flash-remoting/</link>
<pubDate>Fri, 20 Feb 2009 06:56:21 +0000</pubDate>
<dc:creator>Jin Lee</dc:creator>
<guid>http://fxdev.wordpress.com/2009/02/20/aspnet-%ea%b8%b0%eb%b0%98%ec%9d%98-flash-remoting/</guid>
<description><![CDATA[Flash Remoting (AMF3를 활용한) 서버로 .NET 기반의 솔루션을 사용한다면 생각해 볼 수 있는 구성 - WebOrb - Flourine Fx 우리는  &#8217;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Flash Remoting (AMF3를 활용한) 서버로 .NET 기반의 솔루션을 사용한다면</p>
<p>생각해 볼 수 있는 구성</p>
<p>- WebOrb<br />
- Flourine Fx</p>
<p>우리는  &#8217;Flourine Fx&#8217;를 선택했다. 이유는&#8230; Free / Support .NET Framework 1.1 ~ 3.5 (최초 개발 당시 우리 플랫폼은 .NET 1.1 기반이었고, 지금은 3.5) </p>
<p> </p>
<p>특징</p>
<p><strong>- 진짜 빠르다.<br />
- 좀 많이 쉽다.<br />
- Flex 뿐만 아니라 Silverlight도 사용 가능하다!!</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FTP Remoting]]></title>
<link>http://alexandraburuciuc.wordpress.com/2009/01/18/ftp-remoting/</link>
<pubDate>Sun, 18 Jan 2009 15:15:27 +0000</pubDate>
<dc:creator>dulceata</dc:creator>
<guid>http://alexandraburuciuc.wordpress.com/2009/01/18/ftp-remoting/</guid>
<description><![CDATA[Download: source code Folosi-ti FileZilla pentru serverul de FTP. 1 ) Dezarhiva-ti sursa 2 ) Deschid]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Download: <a href="http://www.urcaok.net/download3.php?file=733050">source code </a></p>
<p>Folosi-ti FileZilla pentru serverul de FTP.<br />
1 ) Dezarhiva-ti sursa<br />
2 ) Deschide-ti proiectul Remoting.sln<br />
3 ) Selecta-ti WindowsService1 ca StartUp Project(click dreapta pe el) apoi Build (F6)<br />
4 ) Start -&#62; Programs -&#62;  Microsoft Visual Studio 2008 -&#62; Visual Studio Tools -&#62; Visual Studio 2008 Command Promt -&#62; Apare o fereastra<br />
5 ) Introduce-ti in fereastra de la Command Promt calea unde ati dezarhivat proiectul, apoi intra-ti in Remoting-&#62;WindowsService1-&#62;bin-&#62;Release si executa-ti urmatoarea comanda:<br />
installutil WindowsService1.sln</p>
<p>Va aparea:<br />
The Commit phase completed successfully.<br />
The transacted install has completed.</p>
<p>6 ) Click dreapta pe My Computer -&#62; Manage  : Apare o fereastra Computer Management<br />
In Services and Application selecta-ti Services, cauta-ti AlexFTP si da-ti Start.</p>
<p>7 ) In Visual Studio selecta-ti acum Remoting ca fiind StartUp Project  si rulati-l (CTRL+F5).<br />
In fereastra care apare pute-ti selecta serverul (poate fi si local host daca folositi FileZilla), portul (nu prea are importanta), userul si passul pentru a va putea conecta la server.<br />
Butonul Files este pentru a afisa lista de fisiere de e server din directorul curent.<br />
Pentru Download se va mentiona in TextBox numele fisierului care se doreste a fi downloadat si apoi se apasa pe butonul Download.<br />
ListBoxul retine o istorie a operatiilor executate.</p>
<p>8 ) In directorul Remoting al proiectului -&#62; bin -&#62; Release se gaseste un fisier alex.xml in care se va retine istoria operatiilor.</p>
<p>9 ) La sfarsit:<br />
 Executa-ti urmatoarea comanda in fereastra de la Command promt:<br />
installutil /u WindowsService1.sln</p>
<p>Va aparea:<br />
The uninstall has completed.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Spring M1 for Blaze DS released]]></title>
<link>http://anilchannappa.org/2008/12/18/spring-m1-for-blaze-ds-released/</link>
<pubDate>Fri, 19 Dec 2008 01:57:29 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid>http://anilchannappa.org/2008/12/18/spring-m1-for-blaze-ds-released/</guid>
<description><![CDATA[The first release of BlazeDS and Spring integration has just been released. Jeremy&#8217;s blog prov]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The first release of BlazeDS and Spring integration has just been released. <a href="http://blog.springsource.com/2008/12/17/using-spring-blazeds-integration-m1/" target="_self">Jeremy&#8217;s blog </a>provides a detailed writeup on how to get your Blaze DS and Spring project up and running.</p>
<p>This release addresses the basic bootstrapping and RemoteService. Please watch out for updates such as</p>
<ol>
<li>REST Support</li>
<li>Integration with Spring Security</li>
<li>Integration with Blaze DS Messaging</li>
</ol>
<p>Note: The same configuration described by Jeremy should work with LC DS. If anyone has tried this configuration, let me know.</p>
<p>Got comments? Feel free to contact me, but the best way to get your feedback is to participate in the <a href="http://forum.springframework.org/forumdisplay.php?f=61" target="_self">Spring Blaze DS Integration Forum</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Why Blaze DS?]]></title>
<link>http://anilchannappa.org/2008/11/12/why-blaze-ds/</link>
<pubDate>Wed, 12 Nov 2008 17:58:34 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid>http://anilchannappa.org/2008/11/12/why-blaze-ds/</guid>
<description><![CDATA[2 reasons Reason 1: Remoting = Faster performance Flex enables applications to communicate with the ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>2 reasons</strong></p>
<p><strong>Reason 1: Remoting = Faster performance</strong></p>
<p>Flex enables applications to communicate with the server over AMF, a faster binary alternative to String encoding. If your business logic is available in Java,  Blaze DS offers <strong>Remoting </strong>that enables Flex applications to direct communicate with your business logic over AMF.</p>
<p><em><strong>Note</strong>: The fundamental difference between flex applications and web application is that you don&#8217;t generate your presentation logic on the server. The communication between the Flex client and your server (Blaze DS) is primarily data. Hence your application performs much faster than a typical web application.<br />
</em></p>
<p><strong>Reason 2: Messaging = Live Flex Applications<br />
</strong></p>
<p>The request response nature of HTTP makes it very challenging to create web applications that are not static with out any user interaction. Remember when you watching NFL (any sport scores) on the Internet, your screen updates every 2 minutes to get the latest scores. It is annoying and inefficient. Blaze DS offers a messaging infrastructure that enable you to build server applications that can push messages to Flex Application. Flex applications using Blaze DS don&#8217;t have to blink anymore.</p>
<p>To top it, Blaze DS is Open source and Free to use in production <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[To-Do List]]></title>
<link>http://ehmandev.wordpress.com/2008/09/26/to-do-list/</link>
<pubDate>Fri, 26 Sep 2008 16:47:35 +0000</pubDate>
<dc:creator>keith</dc:creator>
<guid>http://ehmandev.wordpress.com/2008/09/26/to-do-list/</guid>
<description><![CDATA[Well&#8230; I have several things that I want to post on this blog and since this blog is a place wh]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well&#8230; I have several things that I want to post on this blog and since this blog is a place where I will be storing bits of information, my first bit if information will be my To-Do List. Here is a list of the things that I will be posting soon:</p>
<p>1. Using C# to open a DCOM application on a local and remote machine.<br />
2. Writing an application that does not appear in the Windows taskbar and has an icon in the notification area (aka system tray).<br />
3. Serialization of an object using Visual C#.<br />
4. File and directory access using Visual C#.<br />
5. Using the CryptoStream class to save data to a file.<br />
6. Working with the registry using Visual C#<br />
7. Simple .NET Remoting example</p>
<p>I&#8217;m sure that I will come up with more ideas that will make their way to this blog so stay tuned. If there are any topics that you would like me to post about please let me know!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Remote updating of my blog]]></title>
<link>http://chekkin.wordpress.com/2008/09/23/remote-updating-of-my-blog/</link>
<pubDate>Tue, 23 Sep 2008 05:38:48 +0000</pubDate>
<dc:creator>chekkin</dc:creator>
<guid>http://chekkin.wordpress.com/2008/09/23/remote-updating-of-my-blog/</guid>
<description><![CDATA[So I was quite bored recently and I just wrote up some automated script to update a blog from this w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>So I was quite bored recently and I just wrote up some automated script to update a blog from this website over to Xanga except that they thought I was a bot and removed my post. Oh well, at least I tried.</p>
<p>I was just hoping that if that was possible, then I would still really be maintaining one blog but do multiple postings on multiple blogs. But now it&#8217;s getting a little hard so I&#8217;ll post there when I feel like it.</p>
<p>Anyways now I&#8217;ve ditched my XML-RPC tool and an using the Windows Live Writer to auto post onto WordPress and it&#8217;s pretty good. As this is a first post, let&#8217;s hope it doesn&#8217;t go screwy.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[RemoteObject using AMFPHP and Actionscript 3]]></title>
<link>http://gertonscorner.wordpress.com/2008/09/06/remoteobject-using-amfphp-and-actionscript-3/</link>
<pubDate>Sat, 06 Sep 2008 10:11:06 +0000</pubDate>
<dc:creator>Gerton</dc:creator>
<guid>http://gertonscorner.wordpress.com/2008/09/06/remoteobject-using-amfphp-and-actionscript-3/</guid>
<description><![CDATA[In my daytime job i am currently involved with a Flex3/BlazeDS project.The question arises to me qui]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In my daytime job i am currently involved with a Flex3/BlazeDS project.The question arises to me quickly if it was possible to use Actionscript 3 RemoteObject classes with a PHP back end. A quick search with Google showed me some <a title="RemoteObject examples using amfphp" href="http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php" target="_blank">examples</a> where Flex mxml in combination with <a title="amfphp 1.9" href="http://www.amfphp.org/docs2/index.html" target="_blank">amfphp 1.9</a> was used. This particular version of amfphp has support for AMF3 messaging protocol and therefore can be used natively with AS3 RemoteObject.</p>
<p>In my example i wanted to do something different by using AS3 RemoteObject classes and creating Channels at runtime, so no server-config.xml is needed during compile time.</p>
<p><!--more--></p>
<p>For the coming example it is assumed that amfphp 1.9 is installed and running. for the backend service i use a slightly changed HelloWorld.php which can be found in the <a title="first service" href="http://www.amfphp.org/docs2/first_service.html" target="_blank">amfphp examples</a>:</p>
<p><code> class HelloWorld {<br />
/**<br />
* Say hello!<br />
*<br />
* @param  string $sMessage<br />
* @return string<br />
**/<br />
public function say($sMessage) {<br />
$date = getdate();<br />
if (!$sMessage) {<br />
throw new Exception("No message has been given",10001);<br />
}<br />
return 'You said: ' . $sMessage .' on '.$date[weekday];<br />
}<br />
}<br />
?&#62;</code></p>
<p>I introduced a PHP exception when no message parameter is given.<br />
The next step involves the creation of the RemoteService super class. The constructor method is shown below (download <a title="Full example code" href="http://gertonscorner.googlecode.com/files/PHPRemoting.zip" target="_blank">PHPRemoting.zip</a> for full example code).</p>
<p><code>public function RemoteService( serviceId:String<br />
, serviceDestination:String<br />
, amfChannelId:String<br />
, amfChannelEndpoint:String<br />
)<br />
{<br />
// Create a runtime Channelset for given Channel ID and Endpoinr URI<br />
var amfChannel:AMFChannel = new AMFChannel(amfChannelId, amfChannelEndpoint);<br />
amfChannelSet = new ChannelSet();<br />
amfChannelSet.addChannel(amfChannel);<br />
// Create the remoteObject instance<br />
this.remoteObject = new RemoteObject(serviceId);<br />
this.remoteObject.channelSet = amfChannelSet;<br />
this.remoteObject.destination = serviceDestination;<br />
this.remoteObject.addEventListener(FaultEvent.FAULT,onRemoteException);<br />
}</code></p>
<p>All new service classes will extend this RemoteService super class and inherit all methods available.</p>
<p>No we are ready to create the service class for the HelloWorld example, this class will be named HelloWorldService and extends the RemoteService super class.</p>
<p><code>package remoting.services<br />
{<br />
import mx.controls.Alert;<br />
import mx.rpc.events.ResultEvent;<br />
import mx.core.Application;<br />
import remoting.events.RemoteResultEvent;<br />
/**<br />
* Class that extends the RemoteService class, therefore it makes use of the default error handling for<br />
* remote calls.<br />
*/<br />
public class HelloWorldService extends RemoteService {<br />
// Static var with the PHP classname<br />
private static var phpServiceClass:String = "HelloWorld";<br />
//Constructor<br />
public function HelloWorldService(amfChannelId:String, amfChannelEndpoint:String) {<br />
super("helloworldService","amfphp", amfChannelId, amfChannelEndpoint);<br />
}<br />
//<br />
public function say(msg:String):void {<br />
remoteObject.source = phpServiceClass;<br />
remoteObject.say.addEventListener(<br />
ResultEvent.RESULT,handleRemoteMethod);<br />
// call the PHP method<br />
remoteObject.say(msg);<br />
}<br />
// Result handler<br />
protected function handleRemoteMethod(event:ResultEvent):void {<br />
var helloworld:String;<br />
helloworld = event.result.toString();<br />
Application.application.dispatchEvent(<br />
new RemoteResultEvent(RemoteResultEvent.HELLO_WORLD, helloworld));<br />
}<br />
}<br />
}</code></p>
<p>There is only a resulthandler implemented for the remoteobject call, because the fault handler is already implemented within the RemoteService super class. Important thing is the static var phpServiceClass which contains the name of the PHP class which will be binded to the remoteObject.</p>
<p>Now the plumbing is ready (download <a title="Full example code" href="http://gertonscorner.googlecode.com/files/PHPRemoting.zip" target="_blank">PHPRemoting.zip</a> for full example code) it is time to create the Flex application file. This example application has a TextInput box for the message and a Button to call the remote method.</p>
<p><code>&#60;?xml version="1.0" encoding="utf-8"?&#62;<br />
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"<br />
layout="vertical"<br />
creationComplete="init();"&#62;<br />
&#60;mx:Script&#62;<br />
&#60;![CDATA[<br />
import remoting.events.RemoteExceptionEvent;<br />
import remoting.events.RemoteResultEvent;<br />
import remoting.services.HelloWorldService;<br />
import mx.controls.Alert;<br />
//<br />
private var amfChannelId:String = "my-amfphp";<br />
private var amfGateway:String = "http://localhost/amfphp/gateway.php";<br />
private var service:HelloWorldService;<br />
// Initialization<br />
private function init():void {<br />
this.addEventListener(RemoteExceptionEvent.REMOTE_EXCEPTION, handleRemoteExceptionEvent);<br />
this.addEventListener(RemoteResultEvent.HELLO_WORLD, handleRemoteResultEvent);<br />
// Create a new service instance<br />
service = new HelloWorldService( amfChannelId, amfGateway );<br />
}<br />
// Button action handler<br />
private function clickHandler():void {<br />
service.say(msg.text);<br />
}<br />
// Result handlers<br />
private function handleRemoteResultEvent(event:RemoteResultEvent):void {<br />
Alert.show(event.message);<br />
}<br />
private function handleRemoteExceptionEvent(event:RemoteExceptionEvent):void {<br />
Alert.show(event.message);<br />
}<br />
]]&#62;<br />
&#60;/mx:Script&#62;<br />
&#60;mx:TextInput id="msg"/&#62;<br />
&#60;mx:Button label="say something" click="clickHandler();"/&#62;<br />
&#60;/mx:Application&#62;</code></p>
<p>When no text is provided the PHP class will throw an exception which is shown in the Alert box. Just try it out.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[WebORB 3.x is amazing]]></title>
<link>http://crunchbucket.wordpress.com/2008/09/05/weborb-3x-is-effing-amazing/</link>
<pubDate>Fri, 05 Sep 2008 17:37:14 +0000</pubDate>
<dc:creator>crunchbucket</dc:creator>
<guid>http://crunchbucket.wordpress.com/2008/09/05/weborb-3x-is-effing-amazing/</guid>
<description><![CDATA[Oh no they didn&#8217;t.  Wait they did! WebORB is the kitchen sink and then some.  For many of us, ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Oh no they didn&#8217;t.  Wait they did!</p>
<p>WebORB is the kitchen sink and then some.  For many of us, just the AMF transport ( <a title="Ted Patrick" href="http://www.onflex.org/ted/2007/11/abcs-of-amf.php" target="_blank">“The ABC’s of AMF.”</a> ) of G-zipped SON blobs is all we will ever need, but you never know what you really need until you have to live without it.  One spin around WebORBs management console and your needs will change forever.</p>
<p>It is as easy as 1,2,3.</p>
<p>1. Pick your favorite server technology and install the WebORB server.  I chose .NET.</p>
<p>Hit your WebORB service and you are presented with the management console.  If for some reason you are not, the folks at http://www.themidnightcoders.com/ have created a start page that might just point out exactly what you have to do to get your service up and running.  In my case I was installing it on a Windows Server 2008 VM and it did require some extra attention to get the gateway going.  Once I pushed past this everything was straight forward.</p>
<p>The management console has everything you need to begin to develop with this technology, there is no need to go back to the http://www.themidnightcoders.com/ for docs and examples.  See the console main tabs below.</p>
<p><a href="http://crunchbucket.files.wordpress.com/2008/09/picture-2.png"><img class="alignnone size-full wp-image-53" title="WebORB 3.x Management Console" src="http://crunchbucket.wordpress.com/files/2008/09/picture-2.png" alt="" width="621" height="69" /></a></p>
<p>One cool thing is that the examples are running right there on your server providing the proof that the gateway is functional, there is no question if the code you are writing does not work that it is a server issue.</p>
<p>2. Follow the instructions on how to create a C# data class file and code up a test method, I suggest having at least 1 parameter on this method to make it a realistic test. Compile it and drop it in the WebORB bin folder.</p>
<p>Now for some real magic, go back to the management tab on the console and you will see your DLL listed in the Deployed Assemblies tree control on the Services sub tab.  Expand that DLL, Expand your namespace, expand your service name and presto, there is your test method.  One nice thing about WebORB is that it respects the access specifiers of (public, private, protected) and will not show private methods in this tree (or allow calls via the gateway).  Click on your test method name and the right panel changes to a form that allows you to test your method with params!!!  You didn&#8217;t even have to write any client code to test your server code, <strong>they are fricken&#8217; holding our hands here people</strong>&#8230;  Now, go back to the Deployed Assemblies column and click on your service parent.   The Code Generator Tab should show up.  This is actually usable code that mimics the server API on the client, this was my &#8220;aye Dios mio&#8221; moment.  Now for the capper,  look to the right panels Code format / style and choose your client technology from a long list including Cairngorm, PureMVC, AJAX client, and ARP framework.  Did I mention WebORB is &#8220;<a title="Free Fifty Free and a haff" href="http://www.themidnightcoders.com" target="_blank">Free</a>&#8220;?</p>
<p>3. Chose the client example that best fits your need and take the pieces you need for your project, change the properties to match your namespace and method names, and wallah, you are transmitting data in arguably one of the the most efficient manners possible across the wire.</p>
<p>As I said, this is just the tip of the iceberg when it comes to WebORB features.  Click around the console and see for yourself just how powerful and feature rich this package is, you will amazed.</p>
<p>My hat is off and I am fully bowed to The Midnight Coders for unequaled performance and delivery of a very usable data service.  Just what does all this other stuff do!</p>
<p>Note:</p>
<p>AMFPHP is pretty decent and may have everything you need.  My team at Method used AMFPHP in our Flex projects during my tenure.  We didn&#8217;t know about WebORB at the time or I am certain we would have used it.</p>
<p>Feature Request:</p>
<p>Please make the value fields in the results object browser selectable.  It is a real pain to type in a .net GUID into the params value field for an invocation of a method that is keyed off of that GUID.  Better yet, make it a right click on the result value field and send to param (of choice) option.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Introduction to Remoting]]></title>
<link>http://srinutamada1.wordpress.com/2008/09/01/introduction-to-remoting/</link>
<pubDate>Mon, 01 Sep 2008 10:37:37 +0000</pubDate>
<dc:creator>srinutamada</dc:creator>
<guid>http://srinutamada1.wordpress.com/2008/09/01/introduction-to-remoting/</guid>
<description><![CDATA[Introduction to Remoting What is .NET Remoting? .NET Remoting provides a way for application in diff]]></description>
<content:encoded><![CDATA[Introduction to Remoting What is .NET Remoting? .NET Remoting provides a way for application in diff]]></content:encoded>
</item>
<item>
<title><![CDATA[Servidor de Aplicação em .NET]]></title>
<link>http://reginaldojr.wordpress.com/2008/08/31/servidor-de-aplicacao-em-net/</link>
<pubDate>Sun, 31 Aug 2008 14:43:57 +0000</pubDate>
<dc:creator>reginaldojr</dc:creator>
<guid>http://reginaldojr.wordpress.com/2008/08/31/servidor-de-aplicacao-em-net/</guid>
<description><![CDATA[A arquitetura em camadas tem sido amplamente adotada pelos analistas e desenvolvedores de sistemas c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A arquitetura em camadas tem sido amplamente adotada pelos analistas e desenvolvedores de sistemas computacionais. Isso porque esta arquitetura favorece a aplicação de vários conceitos envolvendo a engenharia de software como, por exemplo, modularidade, manutenibilidade, etc. O conceito que motivou a escrita deste post é a escalabilidade, ou seja, o desafio de construir sistemas preparados para &#8220;crescer&#8221;. Um sistema e dito escalável, por exemplo, quando seu desempenho aumenta com acréscimo de hardware. Não estou falando em ficar mais rápido por que agora ele está rodando em um servidor mais rápido do que o antigo. Estou falando em potencial de crescimento e adaptação a cenários de produção. Imagine a situação: Uma pequena empresa com poucos recursos financeiros requisitou da equipe de TI um sistema de gestão empresarial. Após levantamento de requisitos, avaliação das condições de infraestrutura, decidiu-se pela seguinte configuração: arquitetura cliente/servidor. Um servidor de banco de dados foi colocado na rede e a aplicação cliente faria solicitações a este servidor. A aplicação cliente implementava todas as regras de negócio do sistema de gestão e o servidor de banco de dados serviria apenas como repositório de dados. A princípio tudo funcionava bem: LAN com poucos usuários, poucos dados no banco&#8230; Mas a empresa cresceu. Mais usuários na rede, maior volume de dados, novas filiais, negócios via internet, novas regras de negócio, etc. Já está claro que o velho sistema precisaria ser reescrito. Talvez até em outra plataforma de desenvolvimento. Sem falar que, possivelmente, novos especialistas em TI precisarão ser contratados ou, pelo menos, os anteriores terão que passar por algum treinamento/reciclagem. Tudo isso porque não se pensou na possibilidade do sistema crescer em necessidades de regras de negócio juntamente com a necessidade de infraestrutura. A pequena empresa, hoje, tem condições para investir em mais computadores-servidores, internet, redes de longa distância. Ela tem alto volume de dados que precisam ser tratados com velocidade dentro e fora do ambiente da empresa.  Eu pergunto: é qualquer sistema que pode se adaptar a esta nova realidade? O grande desafio é <em>CONSTRUIR SISTEMAS PREPARADOS PRA CRESCER</em>. O sistema não precisa nascer grande mas deve possuir características que, com pequenas adaptações, tenha seu potencial aumentado.</p>
<p>Um bom começo para quem prentende trabalhar com escalabilidade é verificar se seu sistema admite a possibilidade de trabalhar utilizando um servidor de aplicação: as aplicações clientes (desktop ou web) fazem requisições a um servidor. Neste servidor estão implementados todas as regras de negócio e esse servidor faz acesso ao banco de dados para, então, responder às solicitações. Para utilizar essa proposta, que modificações voce teria que fazer no seu sistema?</p>
<ol>
<li>Teria que reescrever o sistema em outra plataforma?</li>
<li>Teria que efetuar algumas mudanças sim. Voce acha que dá pra fazer? Em quanto tempo?</li>
<li>Teria que, primeiro ser treinado em ambiente em camadas pra depois pensar nisso?</li>
<li>Teria que, primeiro mudar sua forma de programar?</li>
<li>Teria que colocar as regras de negócio da aplicação em um só lugar para depois pensar no servidor de aplicação?</li>
<li>Teria que modelar o sistema primeiro em orientação a objetos?</li>
<li>Outro &#8220;teria&#8221; qualquer&#8230;.</li>
</ol>
<p>Veja que parece simples responder a esta pergunta mas não é tão imediato assim. Nem todos os sistemas são preparados para isso efetivamente. Outras respostas:</p>
<ol>
<li>Construimos o sistema com esta visão. Foi previsto que o projeto teria grande possibilidade de crescimento tanto em recursos quanto em necessidades.</li>
<li>Sim. É só modificar o arquivo de configurações do sistema para que as aplicações clientes façam solicitações para o servidor.</li>
<li>Sim. Só preciso modificar uma linha do sistema, recompila-lo e recoloca-lo em produção.</li>
<li>Quantos servidores posso utilizar? Pelo menos um servidor para DAO´s e banco de dados e um outro servidor de regra. Poderiam ser mais servidores de aplicação espalhados pela rede. Depende apenas do nível de resposta que a empresa pretende ter e da disponibilidade de recursos físicos.</li>
<li>O sistema permite dividir papéis facilmente.</li>
<li>Outros &#8220;só se for agora&#8221; qualquer&#8230;.</li>
</ol>
<p>Se voce puder utilizar alguma dessas respostas, parabéns. Voce já está no caminho certo. É essa linha que a engenharia de software moderna quer que os novos sistemas sigam. Para aqueles que aindam não perseguem estes objetivos vou tentar passar algumas dicas como roteiro inicial a seguir.</p>
<p>Eu utilizava .NET 1.1 quando me fiz a seguinte pergunta: Em J2EE, pode-se configurar a utilização de um servidor de aplicação através dos EJB containers. JBoss é um exemplo de servidor de aplicação gratuito em Java. Qual o servidor de aplicação para .NET??? Há um tempo atrás fui a uma apresentação sobre .NET 2.0 com Visutal Studio 2005. Na saída fiz essa pergunta ao facilitador e ele me respondeu com uma palavra: &#8220;Remoting&#8221;. Ao chegar em casa me dediquei a pesquisar sobre o assunto. A seguir, deixo indicado um artigo que serviu de base para nossa trajetória sobre o assunto:</p>
<p><a href="http://www.linhadecodigo.com.br/ArtigoImpressao.aspx?id=691" target="_blank">.NET Remoting – Parte 1 &#8211; Acessando informações remotamente</a><br />
<a href="http://www.linhadecodigo.com.br/ArtigoImpressao.aspx?id=794" target="_blank">.NET Remoting – Parte 2 &#8211; Acessando informações remotamente</a></p>
<p>Desde então temos trabalhado para que a construção dos nossos sistemas tenham carateríscas que viabilizem a arquitetura de acesso remoto. As pessoas que acompanharam em nosso blog os post entitulados <a href="http://reginaldojr.wordpress.com/2008/06/25/visual-studio-nhibernate-construindo-aplicacoes-em-camadas/" target="_blank"><strong>NHIbernate + Visual Studio: Construindo aplicações em camadas</strong></a> devem ter notado em algumas partes dos códigos e da explanação a presença de flags para utilização de servidor de aplicação. Desenvolvemos uma solução chamada <strong>RemoteServer.NET</strong> em Visual Studio com 3 projetos que casa perfeitamente com esses indicadores:</p>
<ol>
<li>RemoteServerWin: Um servidor de aplicação utilizando .NET Remoting que roda como aplicação do windows.</li>
<li>RemoteServerService: Um servidor de aplicação, também utilizando .NET Remoting que roda como serviço do windows.</li>
<li>RemoteServerSetup: Um instalador dos projetos anteriores.</li>
</ol>
<p>Vamos entender o esquema abaixo numa proposta didática, porém bem próxima de uma arquitetura ideal:</p>
<p><a href="http://reginaldojr.files.wordpress.com/2008/08/server_aplic.jpg"><img class="aligncenter size-full wp-image-163" src="http://reginaldojr.wordpress.com/files/2008/08/server_aplic.jpg" alt="" width="500" height="283" /></a></p>
<p>No ínicio do processo temos um usuário utilizando o seu computador para fazer solicitações ao servidor web através de um navegador. O servidor web é responsável apenas pela apresentação e desenho da página web. Qualquer necessidade de processamento de regras de négocio deverá ser enviada ao servidor de negócio. A linha usuario-navegador-servidor web-servidor de negócio poderia ser subistituida por outras configurações: celular-servidor web-servidor de negócio, aplicativo windows-servidor de negócio, etc. O fato é que o servidor de negócio precisa está preparado para receber e responder a requisições remotas. Neste servidor estaria configurado o <strong>RemoteServer.NET</strong> para responder solicitações da camada de apresentação. Algumas vezes o servidor de aplicação precisaria acessar dados do banco de dados. Esse acesso, de acordo com padrões de projetos e arquitetura em camadas deveria ser através de DAO´s. Logo poderiamos ter um servidor DAO para responder requisições feitas pelo servidor de negócio. Neste servidor DAO também teria instalado o <strong>RemoteServer.NET</strong> para responder requisições remotas. Por fim, temos uma máquina como servidor de banco de dados para acesso a dados.</p>
<p>As possibilidades são inúmeras. Imagine um enorme volume de usuários fazendo acesso ao servidor de regra. Poderiamos colocar novos servidores de negócio pra dividir a carga ou mesmo, mais servidores de acesso a dados fazendo com que as requisições fossem aleatórias a estes servidores evitanto o engarrafamento de requisições no mesmo servidor. Poderiamos também fazer replicação sincrona de dados no banco ou mesmo, utilização de cluster para dividir a carga de acesso ao banco de dados. Tudo dependendo do potencial do parque de informática da empresa e necessidade de acesso rápido ás informações. Adicionemos a tudo isso uma dose de XML Web Service para que outra aplicações possam conectar-se diretamente a seu servidor de regras via web.</p>
<p>As aplicações que voce desenvolve suporta essas possibilidades?  Isso é ESCALABILIDADE.</p>
<p>Na nossa página de <a href="http://reginaldojr.wordpress.com/sistemas-c-codigo-fonte/" target="_blank">Sistemas c/ Fontes</a> estamos disponbilizando a solução <strong>RemoteServer.NET</strong> para aqueles que desejarem adquirir e ampliar seus horizontes. Vale lembrar que o RemoteServer.NET sozinho não faz milagre. A aplicação como um todo deve ser pensada para suportar esses requisitos. O primeiro passo é repensar seus conceitos em desenvolvimento e pesquisar soluções que sejam multi-utilizáveis.</p>
<p>Quem desejar adiquirir esse e outros produtos entre em <a href="http://reginaldojr.wordpress.com/contato/">contato</a>. Teremos o maior prazer em responder. Voce estará contribuindo para manter nossas pesquisas bem como, a qualidade das nossas publicações.</p>
<p>É isso.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
