As HTML5 and the surrounding API´s has matured and grown in popularity we see more and more web-applications being built for mobile devices replacing old native applications.
In this article I walk through some of the challenges we face when developing real-time web-apps and also show one of the many ways to overcome these challenges.
Slides from my talk at NDC IoT day in Oslo 2014-11-06.
Code is available on GitHub at https://github.com/codeplanner/NDC-InternetOfThingsDay-2014-11-06
http://inarocket.com
Learn BEM fundamentals as fast as possible. What is BEM (Block, element, modifier), BEM syntax, how it works with a real example, etc.
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
How can we take UX and Data Storytelling out of the tech context and use them to change the way government behaves?
Showcasing the truth is the highest goal of data storytelling. Because the design of a chart can affect the interpretation of data in a major way, one must wield visual tools with care and deliberation. Using quantitative facts to evoke an emotional response is best achieved with the combination of UX and data storytelling.
How to Build a Dynamic Social Media PlanPost Planner
Stop guessing and wasting your time on networks and strategies that don’t work!
Join Rebekah Radice and Katie Lance to learn how to optimize your social networks, the best kept secrets for hot content, top time management tools, and much more!
Watch the replay here: bit.ly/socialmedia-plan
Content personalisation is becoming more prevalent. A site, it's content and/or it's products, change dynamically according to the specific needs of the user. SEO needs to ensure we do not fall behind of this trend.
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
By David F. Larcker, Stephen A. Miles, and Brian Tayan
Stanford Closer Look Series
Overview:
Shareholders pay considerable attention to the choice of executive selected as the new CEO whenever a change in leadership takes place. However, without an inside look at the leading candidates to assume the CEO role, it is difficult for shareholders to tell whether the board has made the correct choice. In this Closer Look, we examine CEO succession events among the largest 100 companies over a ten-year period to determine what happens to the executives who were not selected (i.e., the “succession losers”) and how they perform relative to those who were selected (the “succession winners”).
We ask:
• Are the executives selected for the CEO role really better than those passed over?
• What are the implications for understanding the labor market for executive talent?
• Are differences in performance due to operating conditions or quality of available talent?
• Are boards better at identifying CEO talent than other research generally suggests?
Slides from my talk at NDC IoT day in Oslo 2014-11-06.
Code is available on GitHub at https://github.com/codeplanner/NDC-InternetOfThingsDay-2014-11-06
http://inarocket.com
Learn BEM fundamentals as fast as possible. What is BEM (Block, element, modifier), BEM syntax, how it works with a real example, etc.
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
How can we take UX and Data Storytelling out of the tech context and use them to change the way government behaves?
Showcasing the truth is the highest goal of data storytelling. Because the design of a chart can affect the interpretation of data in a major way, one must wield visual tools with care and deliberation. Using quantitative facts to evoke an emotional response is best achieved with the combination of UX and data storytelling.
How to Build a Dynamic Social Media PlanPost Planner
Stop guessing and wasting your time on networks and strategies that don’t work!
Join Rebekah Radice and Katie Lance to learn how to optimize your social networks, the best kept secrets for hot content, top time management tools, and much more!
Watch the replay here: bit.ly/socialmedia-plan
Content personalisation is becoming more prevalent. A site, it's content and/or it's products, change dynamically according to the specific needs of the user. SEO needs to ensure we do not fall behind of this trend.
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
By David F. Larcker, Stephen A. Miles, and Brian Tayan
Stanford Closer Look Series
Overview:
Shareholders pay considerable attention to the choice of executive selected as the new CEO whenever a change in leadership takes place. However, without an inside look at the leading candidates to assume the CEO role, it is difficult for shareholders to tell whether the board has made the correct choice. In this Closer Look, we examine CEO succession events among the largest 100 companies over a ten-year period to determine what happens to the executives who were not selected (i.e., the “succession losers”) and how they perform relative to those who were selected (the “succession winners”).
We ask:
• Are the executives selected for the CEO role really better than those passed over?
• What are the implications for understanding the labor market for executive talent?
• Are differences in performance due to operating conditions or quality of available talent?
• Are boards better at identifying CEO talent than other research generally suggests?
As smart devices explode, we need a new way to interact with them, you can't download an app for a vending machine you'll use just once. The Physical Web unlocks the superpower of the web, frictionless interaction, for any smart device.
Also, keep in mind, this is, of course, just my list and I deliberately wanted to keep it short because if I specified 20 trends here, I'm not sure if they're really all trends.
What exactly is HTML5 and why is it such a big deal? Will it make a big difference to your business, and is it worth the investment?
HTML5 gives your website new interactive capabilities that allow your visitors to engage with you like never before. Instead of constant page reloads, cumbersome, slow scripts and crash-causing plugins on your site, your website will flow with the technological efficiency of HTML5 and your brand will look much more professional because of it.
The near future of real web applicationsX.commerce
There is a lot of noise being made about HTML5 as the new web technology to use and markets for apps as the best way to sell products and distribute applications to our end users. In reality there is not much new about it - all we are doing is treating the web as a distribution and sharing platform and browsers as the software to run our applications on. In this talk Christian Heilmann of Mozilla shows how in the near future application installation and in-app payments can happen on the most distributed market there is - the internet and through your browser. You will see how the technologies we build web sites in got an upgrade to allow us to build light-weight and focused applications that allow our end users to reach their goals faster and in a more re-usable fashion than with traditional ecommerce. Browsers and hardware are becoming more powerful each day, it is time to use that power in a sensible manner.
An analysis of the trends in the web platform to help you plan, prepare and build for a better web. We'll go into ways to analyse trend data to help you learn more effectively about the platform, and we'll go into tools you'll need to make intelligent decisions when deciding on feature levels and browser support.
HTML5 is here and we should use it right now. It is fun and interesting to look at cool CSS3, Canvas and Video demos but our main goal should be to make our day-to-day life easier by using the cool things browsers offer us right now. Learn about local storage, simplifying interfaces and using HTML5 right now!
Native, Web App, or Hybrid: Which Should You Choose?Softweb Solutions
Which Should You Choose? Native, webapp or Hybrid, each of these types of apps has their advantages and disadvantages. let's learn more about Technology Selection.
Put a UI Developer in a Bank; See What HappensC4Media
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/ZVNdPZ.
Horia Dragomir takes a look at how banks are improving their workflow for web based applications and how they have to support everything from the bleeding edge to the old IE browsers. Filmed at qconlondon.com.
Horia Dragomir is a UI Developer, currently working at wooga in Berlin, where he focuses on developing HTML5 Mobile games. He has spent the better part of his working days in distributed teams, employing agile methods and discovering better ways for teams to work together. Twitter: @hdragomir
The Open Commerce Conference - Premature Optimisation: The Root of All EvilFabio Akita
This is the talk I presented in NYC at the Spree Conference. It's about how we may be making bad decisions out of blindly following misleading pitches. To avoid it, we just need to go back to the basics of CS: Don't optimize prematurely. Here's how.
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Hafiz Ismail
Talk for FOSSASIA 2016 (http://2016.fossasia.org)
----
This talk will give a brief and enlightening look into how GraphQL can help you address common weaknesses that you, as a web / mobile developer, would normally face with using / building typical REST API systems.
Let's stop fighting about whether we should implement the strictest interpretation of REST or how pragmatic REST-ful design is the only way to go, or debate about what REST is or what it should be.
A couple of demos (In Golang! Yay!) will be shown that are guaranteed to open up your eyes and see that the dawn of liberation for product developers is finally here.
Background: GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
Hafiz Ismail (@sogko) is a contributor to Go / Golang implementation of GraphQL server library (https://github.com/graphql-go/graphql) and is looking to encourage fellow developers to join in the collaborative effort.
Keynote- We're going wrong: Choosing the web's future. Peter Paul KochFuture Insights
From FOWA London 2015
Web developers and browser vendors are trying too hard to emulate native apps; in vain, PPK says, because we can't out-native native. Meanwhile this quest for native emulation has a host of undesirable by-effects: too many new browser features that need too many new (and not always performant) tools to create polyfills, which cause too many people to think they only need to understand the tools in order to be a web developer. We're going wrong. We should take some time to figure out what the web is for, how we can have a successful web ecosystem next to, but not in competition with, native ecosystems, and how we should explain what web development is to Java developers and others who come from a non-web background. We need time to think.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
More Related Content
Similar to Challenges Developing Realtime Web Apps
As smart devices explode, we need a new way to interact with them, you can't download an app for a vending machine you'll use just once. The Physical Web unlocks the superpower of the web, frictionless interaction, for any smart device.
Also, keep in mind, this is, of course, just my list and I deliberately wanted to keep it short because if I specified 20 trends here, I'm not sure if they're really all trends.
What exactly is HTML5 and why is it such a big deal? Will it make a big difference to your business, and is it worth the investment?
HTML5 gives your website new interactive capabilities that allow your visitors to engage with you like never before. Instead of constant page reloads, cumbersome, slow scripts and crash-causing plugins on your site, your website will flow with the technological efficiency of HTML5 and your brand will look much more professional because of it.
The near future of real web applicationsX.commerce
There is a lot of noise being made about HTML5 as the new web technology to use and markets for apps as the best way to sell products and distribute applications to our end users. In reality there is not much new about it - all we are doing is treating the web as a distribution and sharing platform and browsers as the software to run our applications on. In this talk Christian Heilmann of Mozilla shows how in the near future application installation and in-app payments can happen on the most distributed market there is - the internet and through your browser. You will see how the technologies we build web sites in got an upgrade to allow us to build light-weight and focused applications that allow our end users to reach their goals faster and in a more re-usable fashion than with traditional ecommerce. Browsers and hardware are becoming more powerful each day, it is time to use that power in a sensible manner.
An analysis of the trends in the web platform to help you plan, prepare and build for a better web. We'll go into ways to analyse trend data to help you learn more effectively about the platform, and we'll go into tools you'll need to make intelligent decisions when deciding on feature levels and browser support.
HTML5 is here and we should use it right now. It is fun and interesting to look at cool CSS3, Canvas and Video demos but our main goal should be to make our day-to-day life easier by using the cool things browsers offer us right now. Learn about local storage, simplifying interfaces and using HTML5 right now!
Native, Web App, or Hybrid: Which Should You Choose?Softweb Solutions
Which Should You Choose? Native, webapp or Hybrid, each of these types of apps has their advantages and disadvantages. let's learn more about Technology Selection.
Put a UI Developer in a Bank; See What HappensC4Media
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/ZVNdPZ.
Horia Dragomir takes a look at how banks are improving their workflow for web based applications and how they have to support everything from the bleeding edge to the old IE browsers. Filmed at qconlondon.com.
Horia Dragomir is a UI Developer, currently working at wooga in Berlin, where he focuses on developing HTML5 Mobile games. He has spent the better part of his working days in distributed teams, employing agile methods and discovering better ways for teams to work together. Twitter: @hdragomir
The Open Commerce Conference - Premature Optimisation: The Root of All EvilFabio Akita
This is the talk I presented in NYC at the Spree Conference. It's about how we may be making bad decisions out of blindly following misleading pitches. To avoid it, we just need to go back to the basics of CS: Don't optimize prematurely. Here's how.
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Hafiz Ismail
Talk for FOSSASIA 2016 (http://2016.fossasia.org)
----
This talk will give a brief and enlightening look into how GraphQL can help you address common weaknesses that you, as a web / mobile developer, would normally face with using / building typical REST API systems.
Let's stop fighting about whether we should implement the strictest interpretation of REST or how pragmatic REST-ful design is the only way to go, or debate about what REST is or what it should be.
A couple of demos (In Golang! Yay!) will be shown that are guaranteed to open up your eyes and see that the dawn of liberation for product developers is finally here.
Background: GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
Hafiz Ismail (@sogko) is a contributor to Go / Golang implementation of GraphQL server library (https://github.com/graphql-go/graphql) and is looking to encourage fellow developers to join in the collaborative effort.
Keynote- We're going wrong: Choosing the web's future. Peter Paul KochFuture Insights
From FOWA London 2015
Web developers and browser vendors are trying too hard to emulate native apps; in vain, PPK says, because we can't out-native native. Meanwhile this quest for native emulation has a host of undesirable by-effects: too many new browser features that need too many new (and not always performant) tools to create polyfills, which cause too many people to think they only need to understand the tools in order to be a web developer. We're going wrong. We should take some time to figure out what the web is for, how we can have a successful web ecosystem next to, but not in competition with, native ecosystems, and how we should explain what web development is to Java developers and others who come from a non-web background. We need time to think.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
1. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
Challenges Developing Realtime Web Apps
As HTML5 and the surrounding API´s has matured and grown in popularity we see more and
more webapplications being built for mobile devices replacing old native applications. When we
first saw the specifications of HTML5 we realized that the “era” of the native applications was
over... There are still lots of occasions where developers choose native instead of web, but I
think that we all can agree on the fact that HTML5 has taken native applications out of its glory
days.
So this HTML5 thingy have to be awesome then... The holy grail...
Well, not really... HTML5 is awesome, but we now face new challenges when developing our
precious webapplications. In this little article I will try to point out some of the challenges we face
developing realtime webapplications and also show how we try to solve them.
Some background... Over the last 6 months we have been receiving questions/statements such
as... “We are replacing our old native app with a new webapplication, we will use websockets
and have some basic demands...”.
“We want to send messages to specific clients based on user properties such as location or a
technicians specific skills”.
And also... “If the client is offline or out of range (network) we want the messages to arrive when
he/she gets reconnected”...
The two demands/questions above is not trivial to solve, especially not if you are starting from
scratch building your own websocket solution. Fortunately most developers will not have to do
so.. There are several great frameworks out there that will help you along the way. To know what
framework you and your team should use I say... Do proof of concepts with a few of the
candidates, even though they look alike on the surface there are huge differences in what you
get.
There are quite a few options out there and I will list some of them objectively below without any
specific order.
Name Service Self Hosted
PubNub X
Pusher X
SignalR X
Socket.IO X
SuperWebSocket X
2. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
Fleck X
Realtime.co X
XSockets.NET X
Autobahn X
Note: Another good resource for realtime framework is Phil Leggetter and his RealTimeTech
Guide http://www.leggetter.co.uk/realtimewebtechnologiesguide
For this guide I will use XSockets.NET, and if you know me that will not be a surprise since I
have been working with XSockets since 2010. Even though my choice is XSockets I would
encourage anyone out there that is a specialist on SignalR, SuperWebSocket, Socket.IO etc to
build your version of the code I produce. That way it gets easier to compare between
frameworks when building this non trivial but commonly demanded functionality.
From here on we write code :)
I will keep it simple and have all code inside of a ASP.NET MVC project event though XSockets
can be installed into a separate project it is easy in development mode to run everything in the
Visual Studio development server.
I think the world has seen enough websocket chats already, but I will create yet another one ;)
The big difference here is that...
● we will be able to target clients based on the location
● messages sent while a client was offline will be sent when he/she gets back
And of course the goal is to solve this without inventing the wheel once again...
Create a new MVC project
I will create a MVC3 project and name it GeolocationBasedChat and then delete all folders and
files except from the global.asax and web.config.
Install XSockets
3. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
To install XSockets open up the package manager console (tools > library package manager >
package manager console).
Type “InstallPackage XSockets” and hit enter
The installation gave you...
● A bootstrapper for XSockets under App_Start
● The required assemblies/references
● The JavaScript API of XSockets
● Some scaffolders (out of scope here)
Change some settings in Visual Studio
In this example I will only use a html file for the client, this means that Visual Studio will not fire up
server side stuff by default. Therefor I...
● right click on the project and select properties.
● select the “Web” tab
● select the “Use Visual Studio Development Server” under the “Server” section
This will now fire up the XSockets server even if we do not request any server side resources.
Part 1 - Server side - Create a real-time controller
In the first part of the server development we will only add a new realtime controller and some
properties.
The easiest way of creating a new controller is to use the scaffolder from the package manager
console. This can scaffold controllers into new projects and reference the new project, but we
will settle with a new controller inside of our GeolocationBasedChat project.
Open the Package Manager Console and type...
Scaffold XSocketController XControllersChatController
This will add a new class (ChatController) under a new folder (XControllers) in our default
project.
4. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
We will now be able to connect to this empty controller.
Part 1 - Client side - Testing the connection
Our new realtime controller names ChatController have no action methods, but we can test the
connection.
In the root of our web add a new html file (default.html) and then add some JavaScript reference
and a few lines of code to test the connection.
If you right click the default.html, select “view in browser” things should fire up. Then if you open
the console (ctrl + shift + j) in Chrome you should see something like.
5. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
Part 2 - Server side - Add action method
Now we know that our new controller is working, so the next step is to add a server side method
to call from our javascript. We will add a basic version to start with and extend it later in the
article. So.. add a method named SendToRange with the following signature in the
ChatController class.
This will obviously send the message to all clients. However one important thing to know about
XSockets is that the server does not broadcast to all clients connected to our ChatController... It
will only send to clients subscribing to the “sendtorange” event. The reason for this is that we do
not want to send anything over the wire that the client does not want (does not subscribe to).
Part 2 - Client side - publish/subscribe
After this section we have a simple chat, that will send messages through our action method to
all subscribers. Changes to the previous version of the client are marked in yellow.
8. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
and the constructor call to it obsolete.
Part 3 - Client side - Location selector
Now, since all clients will get the same city (Madrid) we need to provide a fake city selector in the
client. We will just add a drop down and send a new city to the server when the client changes
the selection.
As you can see we only added a dropdown and a event listener that triggers the setcity method
in our controller.
So if we run the example now we will be able to filter where to send messages based on the
selected city, but we are not quite satisfied since we also wanted to target based on distance...
We will get to that part soon..
9. Uffe Björklund 20130715
uffe@xsockets.net
@ulfbjo
Part 4 - Server side - Sending to clients within x kilometers
Since we added a reference to System.Device and have a GeoCoordinate on our controller we
can use the “GetDistanceTo” method of the GeoCoordinate to select the clients we want to send
to. Once again the changes are displayed in yellow marking.
You can see some minor changes that have a huge effect. by passing in a range we can say
“Send this message to everyone within the range of x kilometers from my location”.
But so far we do not set the range.. That would be our next step.
Part 4 - Client side - Decide how far our message will travel
As you just saw we added some code that decides how far from the clients location the
message will travel. So in our client we want to be able to select a city to get coordinates, and
we can already do so. Now, we also want to pass a range parameter so that we actually can
send messages to other cities (if they are within range).