Push order information to a custom KDS - square-connect

I am using square register to take orders and process payments, and would like to push the order details once a payment is complete / order is saved. I know this can be done through the Connect API, but don't want to rely on internet access and would like an immediate and reliable result (webhooks can take up to 60 seconds).
It seems like this is possible because there are apps such as Fresh KDS that are communicating simply by being on the same wireless network, but do not require internet access, so they aren't hitting the API, but I can't seem to find anywhere in the documentation where this is possible.
Does anyone have any idea how we can do this? Seems like the KDS has to appear as a "printer" in the square hardware section.

Related

NEFilterProvider record network activity

NEFilterProvider, or more specifically its 2 subclasses NEFilterDataProvider and NEFilterPacketProvider, has the functionality to allow or deny network activity. However, I couldn't find any way to log in the activity, for debugging purposes.
I know the documentation says this:
it runs in a very restrictive sandbox. The sandbox prevents the Filter
Data Provider extension from moving network content outside of its
address space by blocking all network access, IPC, and disk write
operations.
but is there any trick to log this anyway in debug mode? Maybe using os_log or something like that?
yes, you can use os_log and read the output in the Console app. if you want to workaround the privacy restrictions (while developing/testing), use the %{public} prefix, like so...
import os.log
// ...somewhere in the provider class
os_log("something i want to log %{public}#", someVar)
you're right, the documentation is really, really lacking for this area, other than the SimpleFirewall sample code, and wwdc video. i have an app in production using NEFilterDataProvider but it about cost me my sanity to figure out how to put it all together. at some point i'm going to try to write some blog posts or make a demo repo to try to help create a central community resource to share knowledge and fill in the gaps in the documentation with hard-won knowledge.

How to monitor an application (Smartcard) access

This is my first post so please bear with me, will i get use to the posting requirements.
I need help finding out when i insert a smartcard (on Windows 64bit machine), what it then access in the background. I have tried using process monitor, process explorer and TCP View. These didn't provide me with what i needed which is to be able to see ports, registry keys, background network access and so on.I need something that will allow me to activate it to observe what happens when i use a smartcard. The idea is that a smartcard is inserted and then it looks at certain registry keys and also checks via an connection various URL's, ports to ensure access is granted. The problem is the software we have installed hasn't put the registry keys where they should be so i can't change them, and these are what i really need to get at. I have also tried searching the registry keys for a value one would be logged under and i can't seem to find it that way either.
I use to have a piece of software years ago that provided it, was a listener of some sort, but i can't think of it for the life of me what it is called. If anyone can point me in the direction of what i need to be thinking off i would be so grateful!
If i need to be clearer please let me know, thanks!
Actually a smartcard accesses nothing on its own. I'm aware, that Windows might look up the ATR in the registry in order to provide a "friendly card name", but if absent no harm is done except not having the friendly card name.
Any actions like internet request are more likely to be associated with a software tool called Service Provider, which knows, what commands to send for this specific card in order to perform actions like:
User authentication
Signature computation
Significant knowledge concerning the specific card is required, so entering some registry entries is far from sufficient. If the card contains a certificate, some software may try to verify the certificate chain or ensure, that the key was not revoked, but this is also not initiated by the card.

Retrieving order information from square register over wirless network

I am using square register to take orders and process payments, and would like to get the order details once a payment is complete / order is saved. I know this can be done through the Connect API, but don't want to rely on internet access and would like an immediate and reliable result (webhooks can take up to 60 seconds).
It seems like this is possible because there are apps such as Fresh KDS that are communicating simply by being on the same wireless network, but do not require internet access, so they aren't hitting the API, but I can't seem to find anywhere in the documentation where this is possible.
What am I missing?
Square doesn't support retrieving order details from Square Registers on the same wireless network yet.

What's google's position on programmatically querying pagerank?

Is there a public API for programmatically querying pagerank? If so, for what level of volumes would it be permitted for a service to use it?
From my Experience, It's OK to query page-rank as long as you do it with 1 second intervals, otherwise Google blocks you IP address after a few queries. if you're using .net there is library to help query page-rank anagrammatically , you can find it here.
Just tried a PageRank tool, and the answer from Google is clear :
http://www.google.com/support/websearch/bin/answer.py?&answer=86640&hl=en
That says :
"If you tried the steps above and haven't resolved the issue, it's very likely that a user or a computer in your network is sending automated traffic to Google. Your network administrator may be able to locate and shut down the source of the automated traffic; feel free to refer them to this page. Sending automated queries of any sort to Google is against our Terms of Service. This includes, among other things, the following activities:
Using any software that sends queries to Google to determine how a website or webpage ranks on Google for various queries"
So the answer is NO : Google forbids and blocks those kind of queries !
This is from google guideline page
http://www.google.com/support/webmasters/bin/answer.py?answer=35769
"Don't use unauthorized computer
programs to submit pages, check
rankings, etc. Such programs consume
computing resources and violate our
Terms of Service. Google does not
recommend the use of products such as
WebPosition Gold™ that send automatic
or programmatic queries to Google"
So I guess that is a no.
But I found this: http://www.fourmilab.ch/webtools/PageRank/ that you could try. I do not know if it is "legal".

How to implement a secure distributed social network?

I'm interested in how you would approach implementing a BitTorrent-like social network. It might have a central server, but it must be able to run in a peer-to-peer manner, without communication to it:
If a whole region's network is disconnected from the internet, it should be able to pass updates from users inside the region to each other
However, if some computer gets the posts from the central server, it should be able to pass them around.
There is some reasonable level of identification; some computers might be dissipating incomplete/incorrect posts or performing DOS attacks. It should be able to describe some information as coming from more trusted computers and some from less trusted.
It should be able to theoretically use any computer as a server, however, optimizing dynamically the network so that typically only fast computers with ample internet work as seeders.
The network should be able to scale to hundreds of millions of users; however, each particular person is interested in less than a thousand feeds.
It should include some Tor-like privacy features.
Purely theoretical question, though inspired by recent events :) I do hope somebody implements it.
Interesting question. With the use of already existing tor, p2p, darknet features and by using some public/private key infrastructure, you possibly could come up with some great things. It would be nice to see something like this in action. However I see a major problem. Not by some people using it for file sharing, BUT by flooding the network with useless information. I therefore would suggest using a twitter like approach where you can ban and subscribe to certain people and start with a very reduced set of functions at the beginning.
Incidentally we programmers could make a good start to accomplish that goal by NOT saving and analyzing to much information about the users and use safe ways for storing and accessing user related data!
Interesting, the rendezvous protocol does something similar to this (it grabs "buddies" in the local network)
Bittorrent is a mean of transfering static information, its not intended to have everyone become producers of new content. Also, bittorrent requires that the producer is a dedicated server until all of the clients are able to grab the information.
Diaspora claims to be such one thing.

Resources