6

In the "A .NET developer's view of Windows 8 app development" session at BUILD, the lecturer mentions that only the client-side WCF features are exposed in the Metro profile, we cannot create a server. ( http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-930C?format=progressive @ ~34:00)

Does this mean that direct peer to peer communication is not possible for Metro applications, and any data exchanged between 2 users over the internet will always have to actually travel through a non-metro-style application?

Youngjae
  • 24,352
  • 18
  • 113
  • 198
gerkberk
  • 79
  • 6
  • 2
    Isn't Metro a UI paradigm? or do you want to write Metro style windows services or web services?! – Davide Piras Sep 21 '11 at 21:55
  • What? No Metro isn't only about changing the UI. For example, the sessions gave me the impression that a lightweight P2P game could perfectly fit as a Metro application, but now I'm unsure if it can actually be made. – gerkberk Sep 21 '11 at 21:58
  • You can do that all but layer your app so to have services in the service layer and not in the UI. – Davide Piras Sep 21 '11 at 22:01
  • If server side WCF features aren't included in the Metro profile, then Metro style applications (at least ones that can be sold in the market) cannot use them in any way, can they? – gerkberk Sep 21 '11 at 22:10

2 Answers2

4

Access to sockets is controlled by the "Internet (Client & Server)" capability, if this capability is enabled in your application, you should be able to send and receive data over the internet.

Larry Osterman
  • 16,086
  • 32
  • 60
  • Okay, found out about Windows.Networking.Sockets. So this all means that we will be able to use plain sockets to create a server, just can't do it using WCF? – gerkberk Sep 21 '11 at 22:20
  • 1
    What features were "left out"? In general, the features that aren't in the .Net 4.5 core profile are those that are redundant or which won't work in metro apps. – Larry Osterman Sep 21 '11 at 22:39
  • 1
    @Larry I think the feature in question is WCF server classes. It's strange if server sockets are there, but the higher-level server framework is not. – Pavel Minaev Sep 22 '11 at 01:39
  • Could you please point me to a url where it's explained how to enable capabilities ? – expert Jan 27 '12 at 04:47
  • There is information on networking and samples in the Dev Center. http://msdn.microsoft.com/en-us/library/windows/apps/br211370.aspx I am looking to provide some basic gaming communication between clients, but I haven't figured out yet if it will require a server in the cloud to achieve that yet. Maybe for identifying clients looking to connect, but hopefully not forcing me to send all communication through it. – kamranicus Oct 31 '12 at 14:04
  • I should also mention, if you're doing a JS-based app, you could possibly use one of the many wrapper libraries for Web Sockets like socket.io – kamranicus Oct 31 '12 at 14:06
0

Since the Metro style apps can't run on background, and are designed to be used fregmentedly, making it P2P enabled makes little sense.

Zhipei
  • 76
  • 5
  • There are tons of application types where 2 users can communicate with each other without requiring an external server just to route the packets through. P2P reduces both latency of clients and server costs. – gerkberk Sep 23 '11 at 08:23
  • @gerkberk What I meant is BitTorrent style P2P. Maybe it didn't fit this question that well. – Zhipei Sep 23 '11 at 09:09