Code Monkey home page Code Monkey logo

ig-haskell's People

Contributors

wjdhamilton avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sahanduiuc

ig-haskell's Issues

Use newBroadcastTChan instead of newTChan

There is no reason for the client to write back to the channel which a realtime subscription is using. According to the docs:

The problem with using newTChan to create the broadcast channel is that if it is only written to and never read, items will pile up in memory. By using newBroadcastTChan to create the broadcast channel, items can be garbage collected after clients have seen them.

https://hackage.haskell.org/package/stm-2.4.4.1/docs/Control-Concurrent-STM-TChan.html

Invisibly subscribe to heartbeat?

A recurrent problem in my trading application is that a data connection silently fails - usually when waiting for an update to arrive from the server.

The heartbeat has been noted to provide stability to incoming connections since it keeps the session alive at the IG end. However, a subscription to the heartbeat may overcome these issues by keeping the mechanism turning over at the IG end.

Investigate Timeout in more detail

The lightstreamer server returns a timeout value on subscribing, but I think I was misusing it since the app said a timeout had occured far too frequently. So I removed it in #8.

This is not a complete fix, since the value is now being ignored. Investigate it and find out how to use it.

Consider how to represent entities that can be read from an LS feed

The IG realtime feeds have a predefined group of fields, and the content of any subscription is provided in a consistent, structured manner.

So it should be possible, therefore to create a class which represents things that can be read from a Lightstreamer feed. Call it RTEntity for now.

The general structure of the data returned for an update (which is what we are interested in from the perspective of data feeds is:

table + "," + item + "|" + values + "\r\n"

Where table is the number of the table

item is the number of the item within the table assigned by the Metadata adapter during the subscription operation

values is a pipe-separated list of the values corresponding to the schema.

For example:

2,1|17.48|1.68|14:32:48
1,1|16.6|3.16|14:32:49
1,1|||14:32:50
2,1|17.47|1.62|14:32:50

In an idea world, the object would map the different values by their field names, but this may not be possible since that information is not available when the channel is initially created in openSession.

The most obvious solution would be to use something like this:

data StreamContent = Update Int Int [Text]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.